PR libstdc++/54924 - Warn for std::string constructor with wrong size
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / ipa-icf-5.C
blob97e3e0c34472e08bba3913f9aa841835e1fa305a
1 /* { dg-do compile } */
2 /* { dg-require-visibility "" } */
3 /* { dg-require-alias "" } */
4 /* { dg-options "-O2 -fdump-ipa-icf" } */
6 struct test
8   int a;
9   float b;
12 extern const struct test myarray __attribute__ ((visibility("hidden")));
13 extern const struct test myarray_alias __attribute__ ((visibility("hidden")));
15 const struct test myarray = {1, 1.5f};
17 extern const struct test myarray_alias __attribute__ ((alias ("myarray")));
19 int main()
21   return myarray.a - myarray_alias.a;
24 /* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf"  } } */