This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testcase] pre-cpplib lexer breakage
- To: gcc-patches at gcc dot gnu dot org
- Subject: [testcase] pre-cpplib lexer breakage
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 6 Feb 2001 17:29:08 +0100
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
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