This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Test for recent asm failure


And one to test traditional stringification actually works.

Committed.

Neil.

	* gcc.dg (20000510-1.S): Rename assembler.S.  Add test
	that we continue to preprocess after an unknown directive.

Index: 20000510-1.S
===================================================================
RCS file: 20000510-1.S
diff -N 20000510-1.S
*** /sourceware/cvs-tmp/cvsvbARKa	Sat Sep 23 04:41:24 2000
--- /dev/null	Tue May  5 13:32:27 1998
***************
*** 1,20 ****
- /* 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" } */
- 
- entry:
- 	foo()
- 
- /*
-    { dg-final { if ![file exists 20000510-1.i] { return }	} }
-    { dg-final { set tmp [grep 20000510-1.i # line]		} }
-    { dg-final { if {[string length $tmp] > 0} \{		} }
-    { dg-final {     pass "20000510-1.S: # preservation"		} }
-    { dg-final { \} else \{					} }
-    { dg-final {     fail "20000510-1.S: # preservation"		} }
-    { dg-final { \}						} }
- */
- 
--- 0 ----
Index: assembler.S
===================================================================
RCS file: assembler.S
diff -N assembler.S
*** /dev/null	Tue May  5 13:32:27 1998
--- assembler.S	Sat Sep 23 04:41:23 2000
***************
*** 0 ****
--- 1,25 ----
+ /* 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" } */
+ 
+ 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]		} }
+    { dg-final { if {[string length $tmp] > 0} \{		} }
+    { dg-final {     pass "20000510-1.S: # preservation"		} }
+    { dg-final { \} else \{					} }
+    { dg-final {     fail "20000510-1.S: # preservation"		} }
+    { dg-final { \}						} }
+ */
+ 
Index: tr-str.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/gcc.dg/cpp/tr-str.c,v
retrieving revision 1.1
diff -c -p -r1.1 tr-str.c
*** tr-str.c	2000/06/27 22:26:11	1.1
--- tr-str.c	2000/09/23 11:41:23
***************
*** 1,4 ****
  /* Test whether traditional stringify works.  */
! /* { dg-do preprocess } */
  /* { dg-options "-traditional" } */
  #define foo(a, b) c="a"; d="b";
--- 1,17 ----
  /* Test whether traditional stringify works.  */
! /* { 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);
+ }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]