diff options
author | Neil Booth <neil@gcc.gnu.org> | 2000-09-23 11:47:05 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-09-23 11:47:05 +0000 |
commit | 87cc8a1d1d8bc6977cb595a2f0ff063252e9f061 (patch) | |
tree | adc9adeef7a45dfba85dd5d2a73d2cde0b915040 | |
parent | c7ef75255b733e857a96b4e55e66a38e0a1d1c0e (diff) | |
download | gcc-87cc8a1d1d8bc6977cb595a2f0ff063252e9f061.zip gcc-87cc8a1d1d8bc6977cb595a2f0ff063252e9f061.tar.gz gcc-87cc8a1d1d8bc6977cb595a2f0ff063252e9f061.tar.bz2 |
20000510-1.S: Rename assembler.S.
* gcc.dg/cpp/20000510-1.S: Rename assembler.S. Add test
that we continue to preprocess after an unknown directive.
* gcc.dg/cpp/tr-str.c: Run-time test for traditional
stringification.
From-SVN: r36577
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/assembler.S (renamed from gcc/testsuite/gcc.dg/cpp/20000510-1.S) | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/tr-str.c | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/20000510-1.S b/gcc/testsuite/gcc.dg/cpp/assembler.S index 7d6508b..729162a 100644 --- a/gcc/testsuite/gcc.dg/cpp/20000510-1.S +++ b/gcc/testsuite/gcc.dg/cpp/assembler.S @@ -1,6 +1,7 @@ /* Regression test - in assembly language, # may have some significance other than 'stringize macro argument' and therefore must be preserved in the output, and should not be warned about. */ + /* { dg-do preprocess } */ #define foo() mov r0, #5 /* { dg-bogus "not followed" "spurious warning" } */ @@ -8,6 +9,10 @@ entry: foo() +/* Check we don't EOF on an unknown directive. */ +#unknown directive +#error a later diagnostic /* { dg-error "diagnostic" } */ + /* { dg-final { if ![file exists 20000510-1.i] { return } } } { dg-final { set tmp [grep 20000510-1.i # line] } } diff --git a/gcc/testsuite/gcc.dg/cpp/tr-str.c b/gcc/testsuite/gcc.dg/cpp/tr-str.c index 3a568ce..bc749ba 100644 --- a/gcc/testsuite/gcc.dg/cpp/tr-str.c +++ b/gcc/testsuite/gcc.dg/cpp/tr-str.c @@ -1,4 +1,17 @@ /* Test whether traditional stringify works. */ -/* { dg-do preprocess } */ +/* { dg-do run } */ /* { dg-options "-traditional" } */ #define foo(a, b) c="a"; d="b"; + +extern void abort (); + +int main () +{ + char *c, *d; + + foo (p, q); + if (c[0] != 'p' || d[0] != 'q') + abort (); + + exit (0); +} |