[committed] hppa: Export main in pr104869.C on hpux

Message ID ZV-7qGTqufuUgo4P@mx3210.localdomain
State Accepted
Headers
Series [committed] hppa: Export main in pr104869.C on hpux |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

John David Anglin Nov. 23, 2023, 8:52 p.m. UTC
  This fixes a hpux linker warning about main not being exported.

Committed to trunk.

Dave
---

hppa: Export main in pr104869.C on hpux

This is needed to avoid a linker warning.

2023-11-23  John David Anglin  <danglin@gcc.gnu.org>

gcc/testsuite/ChangeLog:

	* g++.dg/pr104869.C: Export main on hpux.
  

Patch

diff --git a/gcc/testsuite/g++.dg/pr104869.C b/gcc/testsuite/g++.dg/pr104869.C
index 9a6ef88adbd..13a39fccdb9 100644
--- a/gcc/testsuite/g++.dg/pr104869.C
+++ b/gcc/testsuite/g++.dg/pr104869.C
@@ -68,6 +68,9 @@  struct ControlFlow {
     foo(2);
   return false;
 }
+#ifdef __hpux__
+extern int main(void);
+#endif
 int
 main() {
   ControlFlow cf = { nullptr, ControlFlow::UnwindType::EE };