PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / stackprotectexplicit2.C
blob35d9e886ccf7045c69ffa34e5186c4c42210baa6
1 /* Test that stack protection is done on chosen functions. */
3 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
4 /* { dg-options "-O2 -fstack-protector-explicit" } */
6 int A()
8         int A[23];
9         char b[22];
10         return 0;
13 int __attribute__((stack_protect)) B()
15         int a;
16         int b;
17         return a+b;
20 int __attribute__((stack_protect)) c()
22         int a;
23         char b[34];
24         return 0;
28 /* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */