This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crashing cc1 - merry christmas :)


On Fri, Dec 21, 2001 at 04:54:09PM -0500, Phil Edwards wrote:
> On Fri, Dec 21, 2001 at 10:16:44PM +0100, Cedric Roux wrote:
> > Sorry, I have not much time to investigate the source code, so I let
> > you do (if there is still a problem in your current release).
> 
> You need to send us the source code before we can investigate anything.

He did.  It's a one-liner in the bug report.

int x = (int [2][]){0};

I can reproduce the seg fault on 2.96 and on the 3.0 branch.
The 3.1 mainline simply reports

toto.c:1: warning: missing braces around initializer
toto.c:1: warning: (near initialization for `(anonymous)[0]')

and then terminates normally producing a file with an uninitialized
global x

        .file   "toto.c"
        .comm   x,4,4
        .ident  "GCC: (GNU) 3.1 20011221 (experimental)"

Is that the correct behavior?  If so, you can close the PR.

Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]