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]

[testcase] pre-cpplib lexer breakage


Hi!

Do you think it is worthy to put this testcase in?
It fails miserably in pre-cpplib lexer, in 2.95.x works just by accident and
I think it would be good to make sure parsing is never influenced by #line
lines.

2001-02-06  Jakub Jelinek  <jakub@redhat.com>

	* gcc.c-torture/execute/20010206-1.c: New test.

--- gcc/testsuite/gcc.c-torture/execute/20010206-1.c.jj	Tue Feb  6 17:32:25 2001
+++ gcc/testsuite/gcc.c-torture/execute/20010206-1.c	Tue Feb  6 17:23:36 2001
@@ -0,0 +1,16 @@
+int foo (void)
+{
+  int i;
+#line 1 "20010206-1.c"
+  if (0) i = 1; else i
+#line 1 "20010206-1.c"
+    = 26;
+  return i;
+}
+
+int main ()
+{
+  if (foo () != 26)
+    abort ();
+  exit (0);
+}

	Jakub

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