summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/static_linking_1.f
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-04 08:44:29 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-04 08:44:29 +0000
commit76875ccba880127fc80d845c9926c298a4f49446 (patch)
tree2baeb30ac5f592018a46140e8a34f178598a67b6 /gcc/testsuite/gfortran.dg/static_linking_1.f
parent5f1220947c1397909f7faa88331c7875c6e03810 (diff)
downloadgcc-76875ccba880127fc80d845c9926c298a4f49446.tar.gz
PR libfortran/22298
* runtime/main.c (stupid_function_name_for_static_linking): New function. * runtime/error.c (internal_error): Call stupid_function_name_for_static_linking. * libgfortran.h: Add prototype for stupid_function_name_for_static_linking. * gcc/testsuite/lib/target-supports.exp (check_effective_target_static_libgfortran): New static_libgfortran effective target. * gcc/testsuite/gfortran.dg/static_linking_1.f: New test. * gcc/testsuite/gfortran.dg/static_linking_1.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/static_linking_1.f')
-rw-r--r--gcc/testsuite/gfortran.dg/static_linking_1.f11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/static_linking_1.f b/gcc/testsuite/gfortran.dg/static_linking_1.f
new file mode 100644
index 00000000000..5107a07da77
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/static_linking_1.f
@@ -0,0 +1,11 @@
+! { dg-require-effective-target static_libgfortran }
+! { dg-do run }
+! { dg-additional-sources static_linking_1.c }
+! { dg-options "-static" }
+!
+! This testcase checks that statically linking libgfortran with C main()
+! really calls the constructor function
+! PR libfortran/22298
+ subroutine f
+ print *, "subroutine output"
+ end