2 /* Test that stack protection is disabled via no_stack_protector attribute. */
4 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
5 /* { dg-options "-O2 -fstack-protector-explicit" } */
6 /* { dg-additional-options "-fno-PIE" { target ia32 } } */
8 /* { dg-do compile { target { ! hppa*-*-* } } } */
10 int __attribute__((no_stack_protector)) foo()
17 int __attribute__((stack_protect)) bar()
24 /* { dg-final { scan-assembler-times "stack_chk_fail" 1 { target { ! mips*-*-* } } } }*/
25 /* { dg-final { scan-assembler-times "stack_chk_fail" 2 { target { mips*-*-* } } } }*/