New DLL test added to GCC testsuite
Nick Clifton
nickc@cygnus.com
Wed Jun 30 01:50:00 GMT 1999
Hi Guys,
Now that the gcc_target_object_format proc is available I have
checked in a new test, that makes use of it, to the gcc compile
tests. This test checks that ports that are supposed to be able to
generate DLLs (ie COFF/PE based ones) can actually parse the
attributes without complaining.
Cheers
Nick
1999-06-23 Nick Clifton <nickc@cygnus.com>
* compile/dll.c: New test case. Check that dll attributes
compile.
* compile/dll.x: Only support the dll.c test on ports that
use the COFF/PE file format.
*** /dev/null Tue May 5 21:32:27 1998
--- dll.c Wed Jun 23 16:12:12 1999
***************
*** 0 ****
--- 1,21 ----
+ __declspec (dllimport) int foo;
+ extern int (* import) (void) __attribute__((dllimport));
+ int func2 (void) __attribute__((dllexport));
+
+ __declspec(dllexport) int
+ func1 (int a)
+ {
+ return a + foo;
+ }
+
+ static int
+ internal (void)
+ {
+ return 77;
+ }
+
+ int
+ func2 (void)
+ {
+ return import ();
+ }
*** /dev/null Tue May 5 21:32:27 1998
--- dll.x Wed Jun 30 09:41:09 1999
***************
*** 0 ****
--- 1,20 ----
+ # This test examines the attribute support for DLLs.
+ # Only COFF/PE formats support DLLs, (plus, as a special case
+ # the mcore-elf toolchain), so the code here tries to determine
+ # the file format and decide whether the test should be marked
+ # as unsupported.
+
+ set torture_eval_before_compile {
+
+ if ![istarget "mcore-*-elf"] {
+
+ set objformat [gcc_target_object_format]
+
+ if { $objformat != "pe" } {
+ unsupported "dll.c"
+ return 1
+ }
+ }
+ }
+
+ return 0
More information about the Gcc-patches
mailing list