diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2001-11-28 02:36:03 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2001-11-28 02:36:03 +0000 |
commit | fd2aba001d4f7cd247fb5300afca7312af7dd094 (patch) | |
tree | 78d92f3162ff2866ba9d079383f0f73f686d3b49 /gcc | |
parent | e490616e338de38ffb90494e9d2091b65ea43eed (diff) | |
download | gcc-fd2aba001d4f7cd247fb5300afca7312af7dd094.zip gcc-fd2aba001d4f7cd247fb5300afca7312af7dd094.tar.gz gcc-fd2aba001d4f7cd247fb5300afca7312af7dd094.tar.bz2 |
* gcc.dg/20011127-1.c: New test.
From-SVN: r47394
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20011127-1.c | 30 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3a69d3c..5e9d196 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-11-28 Hans-Peter Nilsson <hp@axis.com> + + * gcc.dg/20011127-1.c: New test. + 2001-11-25 Joseph S. Myers <jsm28@cam.ac.uk> * gcc.dg/format/strfmon-1.c: Update comments. Adjust examples diff --git a/gcc/testsuite/gcc.dg/20011127-1.c b/gcc/testsuite/gcc.dg/20011127-1.c new file mode 100644 index 0000000..a919128 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20011127-1.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2001 Free Software Foundation. + by Hans-Peter Nilsson <hp@axis.com> + + Making sure that invalid asm operand modifiers don't cause an ICE. */ + +/* { dg-do compile { target cris-*-* } } */ +/* { dg-options "-O2" } */ +/* { dg-error "reg:SI|const_double:DF" "prune debug_rtx output" { target cris-*-* } 0 } */ + +void +foo (void) +{ + /* The first case symbolizes the default case for CRIS. */ + asm ("\n;# %w0" : : "r" (0)); /* { dg-error "modifier" } */ + + /* These are explicit cases. Luckily, a register is invalid in most of + them. */ + asm ("\n;# %b0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %v0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %P0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %p0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %z0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %H0" : : "F" (0.5)); /* { dg-error "modifier" } */ + asm ("\n;# %e0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %m0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %A0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %D0" : : "r" (0)); /* { dg-error "modifier" } */ + asm ("\n;# %T0" : : "r" (0)); /* { dg-error "modifier" } */ + /* Add more must-not-ICE asm errors here as we find them ICEing. */ +} |