Nice gcc crash when compiling 'trash' program 
Author Message
 Nice gcc crash when compiling 'trash' program

 Ever seen this gcc error ...
--
88 ares >gcc -v
Reading specs from /usr/local/lib/gcc-lib/hp700/2.5.8/specs
gcc version 2.5.8
89 ares >gcc -o trash trash.c
muell.c: In function `main':
muell.c:4: internal error--unrecognizable insn:
(call_insn 10 8 12 (parallel[
            (set (reg:SI 28 %r28)
                (call (mem:SI (const_int 0))
                    (const_int 16)))
            (clobber (reg:SI 2 %r2))
            (use (const_int 1))
        ] ) -1 (nil)
    (nil))
gcc: Internal compiler error: program cc1 got fatal signal 6
--

 And the sourcecode ...

--
int main(void)
{
  return ((int (*)()) 0) ();

Quote:
}

--

 Should be perfectly legal, shouldn't it :-))
 Anyway, this is my entry on my "shortest portable coredump program" contest.

        Frank :-)

--

 | Darmstaedter Str. 22                                                      |
 | D-63225 Langen, Germany                    RAD Host (PAL/NTSC video,UNIX) |
 +---------------------------------------------------------------------------+



Tue, 20 May 1997 00:53:27 GMT  
 Nice gcc crash when compiling 'trash' program

Quote:
> Ever seen this gcc error ...

Why should I see gcc errors in c.l.c?  If I want to see this kind of
articles, I can read gnu.gcc.bug.  Can't you?

Quote:
>--
>88 ares >gcc -v
>Reading specs from /usr/local/lib/gcc-lib/hp700/2.5.8/specs
>gcc version 2.5.8
>89 ares >gcc -o trash trash.c
>gcc: Internal compiler error: program cc1 got fatal signal 6
>--
> And the sourcecode ...
>--
>int main(void)
>{
>  return ((int (*)()) 0) ();
>}
>--

Looks like an instalation problem with your gcc.  This is what I get:

ues4:~/tmp 31> gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/2.5.8/specs
gcc version 2.5.8
ues4:~/tmp 32> gcc -o trash trash.c
ues4:~/tmp 33>

Quote:
> Should be perfectly legal, shouldn't it :-))
> Anyway, this is my entry on my "shortest portable coredump program" contest.

"undefined behaviour" is not equivalent to core dump.  Proof:

ues4:~/tmp 33> ./trash
ues4:~/tmp 34>

The program is portable, its behaviour isn't (after all, it's undefined :-)

Dan
--
Dan Pop                       | The only reason God was able to make the
CERN, CN Division             | world in 7 days was he didn't have to remain

Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



Wed, 21 May 1997 02:56:41 GMT  
 Nice gcc crash when compiling 'trash' program
Frank Pilhofer:

Quote:
>int main(void)
>{
>  return ((int (*)()) 0) ();
>}
> Anyway, this is my entry on my "shortest portable coredump program" contest.

And this is mine:

main()
{
  main(0);

Quote:
}

At least it dumps core here... (OSF1 3.0).

What is guaranteed to dump core in ANSI C? Nothing.

Jari



Wed, 21 May 1997 05:02:52 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. So what's so nice about nice()?

2. 'free' causes program crash

3. poppi.c won't compile on gcc-3.2

4. can't compile with gcc

5. source won't compile with cc or gcc

6. Looking for gcc/g++/egcs for TI 'c30, 'c40, 'c60

7. Power management trashes my app's System Tray icon

8. gcc compiles with "storage size of 'tzp' isn't known"

9. Padding option in 'gcc' compiler

10. Borland 'C' vs GCC

11. can't compile directX program

12. Checking program's compile time

 

 
Powered by phpBB® Forum Software