[llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/output.c

Reid Spencer reid at x10sys.com
Sun Dec 5 22:16:08 PST 2004



Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/bison:

output.c updated: 1.1 -> 1.2
---
Log message:

Eliminate a fatal SIGSEGV if the input file hasn't been opened. This clears
up an optimization problem when compiled with GCC 3.4.0 -O2 and avoids a
nightly test failure.


---
Diffs of the changes:  (+2 -1)

Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/output.c
diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/output.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/output.c:1.2
--- llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/output.c:1.1	Tue Oct  5 13:31:50 2004
+++ llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/output.c	Mon Dec  6 00:15:58 2004
@@ -1226,7 +1226,8 @@
     fpars = fparser;
   else fpars = fparser1;
 #endif
-
+  if (!fpars || feof(fpars))
+    return;
   c = getc(fpars);
   while (c != EOF)
     {






More information about the llvm-commits mailing list