Bug 10148 - [3.3 regression] [MingW/CygWin] Compiler dumps core
Summary: [3.3 regression] [MingW/CygWin] Compiler dumps core
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.2
: P1 critical
Target Milestone: 3.3.1
Assignee: Danny Smith
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-03-19 13:06 UTC by gh
Modified: 2003-07-11 21:24 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
fields.i (20.85 KB, text/x-c)
2003-05-21 15:17 UTC, gh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gh 2003-03-19 13:06:00 UTC
D:\Gerhard\src\db_row-0.71>gcc -v
Reading specs from c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=min
gw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=f77,c++,objc,ada --disable-wi
n32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)


D:\Gerhard\src\db_row-0.71>c:\MinGW\bin\gcc.exe -save-temps -mno-cygwin -mdll -O -Wall -I. -Ic:\python22\include -c fields.c -o build\temp.win32-2.2\Release\fields.o
fields.c:451: warning: static declaration for `fields_ass_item' follows non-static
fields.c:804: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Release:
3.2

Environment:
Windows 2000SP3 x86

How-To-Repeat:
Compile attached file.
Comment 1 Giovanni Bajo 2003-04-06 23:53:08 UTC
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<gh@ghaering.de>
Cc: "Wolfgang Bangerth" <bangerth@ices.utexas.edu>
Subject: Re: c/10148: [MingW/CygWin] Compiler dumps core
Date: Sun, 6 Apr 2003 23:53:08 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 r=10148
 
 Reduced snippet:
 --------------------------------------------
 struct Foo
 {
     int a;
 };
 
 __attribute__((dllimport)) struct Foo f;
 
 void Bar(void)
 {
     void* dummy = &f;
 }
 
 struct Foo f;
 
 void* dummy = &f;
 --------------------------------------------
 pr10148.c:16: internal compiler error: Segmentation fault
 
 Confirmed under cygwin with 3.2 and 3.3 20030401.
 2.95 can compile the above correctly so it's (at least) a 3.2/3.3
 regression.
 I can't test with 3.4 (mainline broken for cygwin)
 
 Giovanni
 
Comment 2 Wolfgang Bangerth 2003-04-07 13:48:59 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Giovanni comfirmed this
Comment 3 Mark Mitchell 2003-04-16 20:50:34 UTC
*** This bug has been marked as a duplicate of 7910 ***
Comment 4 Giovanni Bajo 2003-06-04 02:51:45 UTC
Not a duplicate of c++/7910 since it now behaves differently.
Comment 5 Giovanni Bajo 2003-06-04 02:52:27 UTC
Danny, this is another dllimport regression still present on the 3.3 branch.
Comment 6 Danny Smith 2003-07-11 21:24:27 UTC
With recent patches to branch
http://gcc.gnu.org/ml/gcc-cvs/2003-07/msg00476.html
http://gcc.gnu.org/ml/gcc-cvs/2003-07/msg00477.html
http://gcc.gnu.org/ml/gcc-cvs/2003-07/msg00478.html

and earlier fixes to mainline,

We now get this warning rather than ICE.

10148.C:14: warning: 'Foo f' defined locally after being referenced with 
   dllimport linkage.

Danny