1 /* This test checks that local aliases behave sanely. This is necessary for code correctness
2 of aliases introduced by ipa-visibility pass.
4 If this test fails either aliases needs to be disabled on given target on aliases with
5 proper semantic needs to be implemented. This is problem with e.g. AIX .set pseudo-op
6 that implementes alias syntactically (by substituting in assembler) rather as alternative
7 symbol defined on a target's location. */
10 { dg-options "-Wstrict-aliasing=2 -fstrict-aliasing" }
11 { dg-require-alias "" }
12 { dg-additional-sources "localalias-2.c" } */
13 extern void abort (void);
14 extern void tt (void);
15 extern int test2count
;
17 __attribute__ ((weak
,noinline
))
22 __attribute ((alias("test")))
23 static void test2(void);
28 /* This call must bind locally. */
32 /* Depending on linker choice, this one may bind locally
33 or to the other unit. */
34 if (!testcount
&& !test2count
)
38 if ((testcount
!= 1 || test2count
!= 3)
39 && (testcount
!= 3 || test2count
!= 1))