egcs internal error on inline function static data
Richard Earnshaw
rearnsha@arm.com
Wed Jun 30 23:07:00 GMT 1999
> Summary:
>
> egcs 1.12 (C++) on arm/aout gives a warning about inline function static
> data (which is fair enough I suppose, I haven't actually checked the
> standard yet) but it then crashes with an internal compiler error.
>
> Source file causing the error:
> foo.cc
> ======
> extern void baz();
> extern void bar();
>
> inline void myfunc()
> {
> static int entered = 0;
> if ( !entered )
> {
> entered = 1;
> baz();
> }
> bar();
> }
>
> void bazbar()
> {
> myfunc();
> }
>
> It works fine with 'C' rather than 'C++', or with C++ on linux glibc
> x86.
This appears to have been fixed in the upcoming 2.95 release. I get the
same warning, but compilation completes sucessfully.
Richard.
More information about the Gcc-bugs
mailing list