libstdc++: Define __glibcxx_assert_fail for non-verbose build [PR115585]
[official-gcc.git] / gcc / testsuite / gcc.dg / darwin-weakimport-3.c
blob7e83987bad5e428505a13ea4dba6bc41afd54035
1 /* { dg-do compile { target *-*-darwin* } } */
3 /* Here we want to test if "foo" gets placed into a coalesced
4 section (it should not).
6 However, for i386, and PIC code we have a "get_pc thunk" that
7 is (correctly) placed in a coalesced section when using an older
8 linker - also unwind tables are emitted into coalesced.
10 With modern linkers this is moot, since even weak symbols
11 are emitted into the regular sections.
13 To avoid the unwind tables -fno-asynchronous-unwind-tables
14 and fno-unwind-tables (since EH contains coalesced data).
15 To ensure that we emit code for an older linker -mtarget-linker
16 To avoid the get_pc thunk optimise at least O1. */
18 /* { dg-options "-fno-asynchronous-unwind-tables -fno-unwind-tables -O1 -mtarget-linker 85.2" } */
19 /* { dg-require-weak "" } */
21 /* { dg-final { scan-assembler-not "coalesced" } } */
23 extern void foo(void) __attribute__((weak_import));
25 void foo(void)