diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/stack-clash-protection.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/stack-clash-protection.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/stack-clash-protection.c b/gcc/testsuite/gcc.target/i386/stack-clash-protection.c new file mode 100644 index 0000000..5be28cb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/stack-clash-protection.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fstack-clash-protection" } */ + +int flag; +void open(); +int getChar(); +typedef enum { QUOTE } CharType; +typedef enum { UNQ } State; +CharType getCharType(); +void expand() { + open(); + if (flag) + return; + int ch = getChar(); + State nextState = getCharType(); + if (nextState) + while (ch) + ; +} |