c++ errors in gcc 3.3 prelease 2?

Andrew Pinski pinskia@physics.uc.edu
Sat May 10 21:54:00 GMT 2003


This is not really a failure per say but a fall out do to a change in  
bison.

Both syntax and parse error are the same, this can be fixed by changing  
the test to include both forms of the error: "parse|synax error".

The code is invalid so it cannot be able to compiled but the compiler  
should not ice.

Thanks,
Andrew Pinski


On Saturday, May 10, 2003, at 17:42 US/Eastern, Jack Howarth wrote:

> Hi,
>    On debian ppc sid, the current gcc-3.3 prelease build based on the
> 20030509 code base shows two c++ failures that aren't showing up in
> Mark Mitchell's builds on entropy. On debian ppc sid I find...
>
> Executing on host:  
> /home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/build/gcc/testsuite/../g++  
> -B/home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/build/gcc/testsuite/..// 
> home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/gcc/testsuite/g++.dg/ 
> parse/crash2.C  -nostdinc++  
> -I/home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/build/powerpc-linux/ 
> libstdc++-v3/include/powerpc-linux  
> -I/home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/build/powerpc-linux/ 
> libstdc++-v3/include  
> -I/home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/libstdc++-v3/ 
> libsupc++  
> -I/home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/libstdc++-v3/libio  
> -I/home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/libstdc++-v3/ 
> include/backward  
> -I/home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/libstdc++-v3/ 
> testsuite -fmessage-length=0   -ansi -pedantic-errors -Wno-long-long-S  
>  -o crash2.s    (timeout = 300)
> /home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/gcc/testsuite/g++.dg/ 
> parse/crash2.C: In function `int main()':
> /home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/gcc/testsuite/g++.dg/ 
> parse/crash2.C:5: error: syntax error
> compiler exited with status 1
> output is:
> /home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/gcc/testsuite/g++.dg/ 
> parse/crash2.C: In function `int main()':
> /home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/gcc/testsuite/g++.dg/ 
> parse/crash2.C:5: error: syntax error
>
> FAIL: g++.dg/parse/crash2.C  (test for errors, line 5)
> FAIL: g++.dg/parse/crash2.C (test for excess errors)
> Excess errors:
> /home/howarth/debian-gcc-3.3/gcc-3.3-3.3ds8/src/gcc/testsuite/g++.dg/ 
> parse/crash2.C:5: error: syntax error
>
>
> The crash2.C code is...
>
> /* { dg-do compile } */
> int main(void)
> {
>   char x, y;
>   if ('A' == x) && ('B' == y)) { } /* { dg-error "parse error" } */
>   if (x == 'A') && (y == 'B')) { }
> }
>
> which with the gcc-3.3 prerelease generates...
>
> g++-3.3 crash2.C
> crash2.C: In function `int main()':
> crash2.C:5: error: syntax error
>
> What is the expected behavior of this test at this time? To just
> generate a compiler error or should it actual pass generating
> code? The same code segfaults g++-3.2.3.
>                         Jack
>
>



More information about the Gcc mailing list