bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in bison 1.875


From: Martin MOKREJŠ
Subject: Re: bug in bison 1.875
Date: Fri, 28 Feb 2003 12:02:43 +0100 (CET)

On Fri, 28 Feb 2003, Paul Eggert wrote:

> Martin MOKREJŠ <address@hidden> writes:
>
> >   I've bison compiled on Tru64Unixc 5.1A with cc. I had to decrease
> > optimization flags from -O2 to -O, otherwise even latest version of
> > compiler crashed. However, one test supplied with automake-1.7.2 fails
> > because of bison crashing.
>
> Did you successfully run "make check" when you built Bison?  If so, I
> suppose that we should add the automake test to the Bison test suite.

I't more complex. The configure check for C99 already breaks with
"internal compiler error":

configure:4857: checking for stdbool.h that conforms to C99
configure:4911: cc -c -O2 -arch ev56 -I/software/@sys/usr/include 
-I/usr/local/include -I/usr/local/openssl/include conftest.c >&5
cc: Error: configure, line 4919: Bug found in compiler: 
generate_address_constant : Unexpected opcode. (compilerbug)
          bool e = &s;
-------------------^
Internal compiler error detected at line 1512 in file 
/usr/proj/decc2/ccdtk-v4-2/src/me_gemc/initgen.c.
cc: Fatal: A memory access violation (bus error or segmentation fault)
has occurred.  Please submit a problem report.
configure:4914: $? = 1
configure: failed program was:
| #line 4862 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU Bison"
| #define PACKAGE_TARNAME "bison"
| #define PACKAGE_VERSION "1.875"
| #define PACKAGE_STRING "GNU Bison 1.875"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define PACKAGE "bison"
| #define VERSION "1.875"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define YYTEXT_POINTER 1
| #define M4 "/software/@sys/usr/bin/m4"
| #define STDC_HEADERS 1
| #define HAVE_CTYPE_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
|
|         #include <stdbool.h>
|         #ifndef bool
|          "error: bool is not defined"
|         #endif
|         #ifndef false
|          "error: false is not defined"
|         #endif
|         #if false
|          "error: false is not 0"
|         #endif
|         #ifndef true
|          "error: false is not defined"
|         #endif
|         #if true != 1
|          "error: true is not 1"
|         #endif
|         #ifndef __bool_true_false_are_defined
|          "error: __bool_true_false_are_defined is not defined"
|         #endif
|
|         struct s { _Bool s: 1; _Bool t; } s;
|
|         char a[true == 1 ? 1 : -1];
|         char b[false == 0 ? 1 : -1];
|         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
|         char d[(bool) -0.5 == true ? 1 : -1];
|         bool e = &s;
|         char f[(_Bool) -0.0 == false ? 1 : -1];
|         char g[true];
|         char h[sizeof (_Bool)];
|         char i[sizeof s.t];
|
| int
| main ()
| {
|  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
|   ;
|   return 0;
| }
configure:4931: result: no

$ cc -V
Compaq C V6.5-207 (dtk) on Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.5-207 (dtk) (dtk) cc Driver

So I'd go for the test-code above or just check version output of the
compiler.

>
> > I don't know if it would be better to force lower optimization in
> > general,
>
> It should be sufficient to have "make check" detect stuff like this.


Actually, I think I forgot to run make check. ;( A lot of them failed now.
I can't say all those core dumps are because of another compiler error,
but might be. Should I resolve the individual stack traces?

These test failed when -O2 was used:
testsuite: 27 36 37 44 47 79 81 82 85 87 89 94 failed
These test failed when -O was used:
testsuite: 27 36 37 44 47 79 81 82 85 87 89 94 failed

I'll send you directly 2 testsuite.log file. One with the tests failed
with the -O2 binary, the second with -O optimized binary.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]