Bug 21081 - [4.0 Regression] internal compiler error: verify_stmts failed.
Summary: [4.0 Regression] internal compiler error: verify_stmts failed.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code, patch
: 21836 25549 (view as bug list)
Depends on:
Blocks: 21275 21766 23589
  Show dependency treegraph
 
Reported: 2005-04-18 00:44 UTC by Fehmi Demiralp
Modified: 2007-01-21 21:56 UTC (History)
5 users (show)

See Also:
Host:
Target: i686-*-cygwin
Build:
Known to work: 4.1.0 3.4.4 4.1.1 4.1.2
Known to fail: 4.0.0
Last reconfirmed: 2005-05-01 13:17:17


Attachments
the preprocessor file that is generated with -v -save-temps (12.79 KB, application/x-zip-compressed)
2005-04-18 00:50 UTC, Fehmi Demiralp
Details
the preprocessor file that is generated with -v -save-temps without PCH (181.97 KB, application/x-zip-compressed)
2005-04-18 02:38 UTC, Fehmi Demiralp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fehmi Demiralp 2005-04-18 00:44:27 UTC
I have get gcc code from the cvs and copiled it for cygwin.
here are the the information about them

$ uname -a
CYGWIN_NT-5.1 demiralp 1.5.14(0.126/4/2) 2005-04-01 13:40 i686 unknown unknown 
Cygwin

$ gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: /usr/cvs-src/gcc/configure 
Thread model: single
gcc version 4.1.0 20050417 (experimental)

the bug I want to report appears when the package wxwidgests, that is avaibale 
at internet , is compiled.

the cpmpilation options are:
g++ -c -o netdll_http.o -I.pch/wxprec_netdll -D__WXMSW__ -DwxUSE_GUI=0 -
DWXUSINGDLL -DWXMAKINGDLL_NET -DWX_PRECOMP -DNO_GCC_PRAGMA -
Ilib/wx/include/msw-ansi-release-2.6 -I/usr/cvs-src/wxWidgets/include -
D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -O2 -Wall -Wno-ctor-dtor-privacy /usr/cvs-
src/wxWidgets/src/common/http.cpp

the error message is:
internal compiler error: verify_stmts failed
Comment 1 Fehmi Demiralp 2005-04-18 00:50:11 UTC
Created attachment 8670 [details]
the preprocessor file that is generated with -v -save-temps
Comment 2 Andrew Pinski 2005-04-18 00:52:28 UTC
Can you try to reproduce this without the PCH or attach the preprocessed source for the PCH file?
Comment 3 f.demiralp@gmail.com 2005-04-18 02:24:14 UTC
Subject: RE:  internal compiler error: verify_stmts failed.

I have removed the folder .pch and compiled the source file again like
below.
but it did no diffrence. ( I hope I don't not misunderstand what you asked)

[Fehmi Demiralp@demiralp ...src/wxwidgets2]$ g++ -c -o
netdll_http.o -D__WXMSW__ -DwxUSE_GUI=0 -DWXUSINGDLL -DWXMAKINGDLL_NET -DNO_
GCC_PRAGMA -Ilib/wx/include/msw-ansi-release-2.6 -I/usr/cvs-src/wxWidgets/in
clude -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -O2 -Wall -Wno-ctor-dtor-privacy
/usr/cvs-src/wxWidgets/src/common/http.cpp
/usr/cvs-src/wxWidgets/include/wx/string.h:58: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/string.h:248: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/string.h:612: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/object.h:27: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/object.h:50: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/object.h:51: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/object.h:52: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/object.h:495: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/thread.h:117: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/thread.h:118: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/thread.h:119: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/thread.h:120: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/thread.h:121: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/event.h:43: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/event.h:52: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/event.h:420: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/event.h:2190: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/event.h:2232: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/app.h:31: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/app.h:32: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/app.h:33: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/app.h:34: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/app.h:35: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/app.h:44: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/list.h:62: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/list.h:331: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/list.h:395: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/list.h:457: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/list.h:461: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/stream.h:28: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/stream.h:29: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/stream.h:30: warning: type attributes are
honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/hashmap.h:684: warning: type attributes
are honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/hashmap.h:684: warning: type attributes
are honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/protocol/http.h:21: warning: type
attributes are honored only at type definition
/usr/cvs-src/wxWidgets/include/wx/protocol/http.h:21: warning: type
attributes are honored only at type definition
/usr/cvs-src/wxWidgets/src/common/http.cpp: In member function 'wxString
wxHTTP::GetHeader(const wxString&) const':
/usr/cvs-src/wxWidgets/src/common/http.cpp:117: error: Invalid operand to
unary operator
&wxEmptyStringD.5167;

/usr/cvs-src/wxWidgets/src/common/http.cpp:117: internal compiler error:
verify_stmts failed.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: 18 April 2005 01:52
To: fdemiralp@gmail.com
Subject: [Bug c++/21081] internal compiler error: verify_stmts failed.



------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-18
00:52 -------
Can you try to reproduce this without the PCH or attach the preprocessed
source for the PCH file?


Comment 4 Andrew Pinski 2005-04-18 02:26:26 UTC
(In reply to comment #3)
> Subject: RE:  internal compiler error: verify_stmts failed.
> 
> I have removed the folder .pch and compiled the source file again like
> below.
> but it did no diffrence. ( I hope I don't not misunderstand what you asked)

That is good, could you attach the .ii file which is produced now as the old one said it needed the .pch 
file?
Comment 5 Fehmi Demiralp 2005-04-18 02:38:55 UTC
Created attachment 8672 [details]
the preprocessor file that is generated with -v -save-temps without PCH
Comment 6 Andrew Pinski 2005-04-18 02:52:02 UTC
Hmm, I cannot reproduce this with last night's compiler, I will try with a later compiler, maybe this was 
already fixed.
Comment 7 Andrew Pinski 2005-04-18 18:39:14 UTC
Can you try this with today's compiler, I cannot reproduce it with it.
Comment 8 f.demiralp@gmail.com 2005-04-19 00:13:06 UTC
Subject: RE:  [4.1 Regression] internal compiler error: verify_stmts failed.

I have got the same error message.

-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: 18 April 2005 19:39
To: fdemiralp@gmail.com
Subject: [Bug tree-optimization/21081] [4.1 Regression] internal
compiler error: verify_stmts failed.



------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-18
18:39 -------
Can you try this with today's compiler, I cannot reproduce it with it.

--


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21081

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

Comment 9 f.demiralp@gmail.com 2005-04-19 22:14:49 UTC
Subject: RE:  [4.1 Regression] internal compiler error: verify_stmts failed.



I updated gcc from the cvs repository today and I gave a try again.
but I still have got no luck. I have got the same error.

here is the version info of g++ I build today

$ g++ -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with:
/usr/cvs-src/gcc/configure --verbose --enable-languages=c,c++ --enable-nls -
-without-included-gettext --with-system-zlib --enable-interpreter --enable-t
hreads=posix --enable-sjlj-exceptions --disable-version-specific-runtime-lib
s --disable-win32-registry
Thread model: posix
gcc version 4.1.0 20050419 (experimental)


on the other hand I have tried to compile same file by the gcc that is
distributes with cygwin, I works.
the problem I report disappears.

here is the version info of g++ that is distributed with cygwin.

$ /bin/g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
Configured with:
/gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysc
onfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,pasca
l --enable-nls --without-included-gettext --enable-libgcj --with-system-zlib
 --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable
-sjlj-exceptions --disable-version-specific-runtime-libs --disable-win32-reg
istry
Thread model: posix
gcc version 3.3.3 (cygwin special)

I think I should not use experimental version of g++ with cygwin.

thank you very much anyway

Comment 10 Andrew Pinski 2005-04-19 23:48:17 UTC
Ok, I can reproduce this with a cross compiler, reducing.
Comment 11 Andrew Pinski 2005-04-20 00:08:40 UTC
Do you know if this also works with the 4.0 branch?

Reduced testcase:
class wxString;

extern __attribute__((dllimport)) char* wxEmptyString;

struct wxString {};

inline wxString& wxGetEmptyString()
{
    return *(wxString *)&wxEmptyString;
}
wxString GetHeader()
{
    return wxGetEmptyString();
}

This is very target dependent as the __attribute__ is which is causing the problem.
Comment 12 f.demiralp@gmail.com 2005-04-21 22:14:43 UTC
Subject: RE:  [4.1 Regression] internal compiler error: verify_stmts failed.

I checked the gcc_4_0_0_release out from the cvs repository today and I have
tried it.

here the g++ version information
g++ -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with:
/usr/cvs-src/gcc4/configure --verbose --enable-languages=c,c++ --enable-nls 
--without-included-gettext --with-system-zlib --enable-interpreter --enable-
threads=posix --enable-sjlj-exceptions --disable-version-specific-runtime-li
bs --disable-win32-registry
Thread model: posix
gcc version 4.0.0

I have got the same error.

if the reduced testcase you extract from the http.ii compiled without
optimisation ( -O2), it seems okay
but if the optimisation option is applied, it fails

$ g++ -c -O2 -Wall -Wno-ctor-dtor-privacy reduced.cpp
reduced.cpp: In function 'wxString GetHeader()':
reduced.cpp:11: internal compiler error: in valid_in_set, at
tree-ssa-pre.c:1082
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

do you think this is the same problem? or a new one should be submitted.

Fehmi Demiralp


-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: 20 April 2005 01:09
To: fdemiralp@gmail.com
Subject: [Bug tree-optimization/21081] [4.1 Regression] internal
compiler error: verify_stmts failed.



------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-20
00:08 -------
Do you know if this also works with the 4.0 branch?

Reduced testcase:
class wxString;

extern __attribute__((dllimport)) char* wxEmptyString;

struct wxString {};

inline wxString& wxGetEmptyString()
{
    return *(wxString *)&wxEmptyString;
}
wxString GetHeader()
{
    return wxGetEmptyString();
}

This is very target dependent as the __attribute__ is which is causing the
problem.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-20 00:08:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21081

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

Comment 13 Andrew Pinski 2005-04-21 22:49:08 UTC
The problem is the same, the symptom is different because the 4.0 branch has --enable-
checking=release done while the mainline is --enable-checking=yes.
Comment 14 Andrew Pinski 2005-05-01 13:17:16 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00009.html>.
Comment 15 Andrew Pinski 2005-05-31 13:37:30 UTC
*** Bug 21836 has been marked as a duplicate of this bug. ***
Comment 16 Andrew Pinski 2005-06-05 06:51:47 UTC
Newer patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02945.html>.
Comment 17 Mark Mitchell 2005-07-06 17:02:52 UTC
Postponed until 4.0.2.
Comment 18 Danny Smith 2005-10-12 20:56:58 UTC
Fixed in trunk.
http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00474.html
Comment 19 Andrew Pinski 2005-10-12 21:08:49 UTC
Fixed on the mainline, it is up to Danny if this is too big to back port.
Comment 20 Andrew Pinski 2005-12-25 00:55:31 UTC
*** Bug 25549 has been marked as a duplicate of this bug. ***
Comment 21 Gabriel Dos Reis 2007-01-18 03:46:08 UTC
won't fix for GCC-4.0.x
Comment 22 Andrew Pinski 2007-01-21 21:56:21 UTC
Fixed.