Bug 47589 - [4.3/4.4 Regression] internal compiler error: Segmentation fault
Summary: [4.3/4.4 Regression] internal compiler error: Segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.4.5
: P3 normal
Target Milestone: 4.4.6
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, patch
: 47588 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-02 15:39 UTC by Maxim Egorushkin
Modified: 2011-05-28 15:22 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 4.1.2, 4.2.4, 4.5.2, 4.6.0
Known to fail: 4.3.5, 4.4.5, 4.5.1
Last reconfirmed: 2011-02-02 23:18:48


Attachments
Archived preprocessed source (123.17 KB, application/octet-stream)
2011-02-02 15:43 UTC, Maxim Egorushkin
Details
reduced testcase (174 bytes, text/plain)
2011-02-02 17:22 UTC, Jonathan Wakely
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Egorushkin 2011-02-02 15:39:27 UTC
g++ crashing consistently on the attached (preprocessed) source.

$ /usr/bin/g++ -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.5 20101112 (Red Hat 4.4.5-2) (GCC) 

$ /usr/bin/g++ -c -o /home/yegorm/depot1/cmm/prj_ledger_dev/build/Linux-x86_64-64.g++-debug/obj/infra/demux/unit_test.o     -m64 -I/home/yegorm/depot1/cmm/prj_ledger_dev/include -I/home/yegorm/depot1/cmm/prj_ledger_dev/include/Linux-x86_64-64.g++ -I/opt/atm/gcc-4.1-64/include/tzcode2009i -I/apps/infra/3rd-party/gcc-4.4-64/libxml2-2.7.7/include/libxml2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_USE_C99_MATH -D__STDC_FORMAT_MACROS -pipe  -g -I/apps/infra/3rd-party/gcc-4.4-64/boost-1_42/include -I/apps/infra/3rd-party/gcc-4.4-64/qt-4.6.3/include -I/opt/atm/gcc-4.1-64/include/oapi-17.2 -I/apps/infra/3rd-party/gcc-4.4-64/hdf5-1.8.5/include -I/apps/infra/3rd-party/gcc-4.4-64/matio-1.3.4/include -I/apps/infra/3rd-party/gcc-4.4-64/gdbm-1.8.3/include -Wall -Wextra -Wno-parentheses -Wno-missing-field-initializers -Wno-unused-parameter -Winit-self -Wcast-align -Wmissing-include-dirs -Wpointer-arith -Wwrite-strings -Wno-non-virtual-dtor -Wno-multichar -Wno-ignored-qualifiers -march=native -fdiagnostics-show-option -fno-strict-aliasing -Werror=return-type -Werror=format-extra-args  -fmessage-length=0 -falign-functions   -MD -MP -MF /home/yegorm/depot1/cmm/prj_ledger_dev/build/Linux-x86_64-64.g++-debug/obj/infra/demux/unit_test.d /home/yegorm/depot1/cmm/prj_ledger_dev/src/infra/demux/unit_test.cc

In file included from /home/yegorm/depot1/cmm/prj_ledger_dev/src/infra/demux/unit_test.cc:1:
/home/yegorm/depot1/cmm/prj_ledger_dev/src/infra/demux/demux.h: In constructor 'atm::demux::TaggedFd<EventTag, Derived>::TaggedFd() [with EventTag = <unnamed>::FdTag, Derived = <unnamed>::DemuxTestClient]':
/home/yegorm/depot1/cmm/prj_ledger_dev/src/infra/demux/unit_test.cc:49:   instantiated from here
/home/yegorm/depot1/cmm/prj_ledger_dev/src/infra/demux/demux.h:325: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccfLB5zA.out file, please attach this to your bugreport.
Comment 1 Maxim Egorushkin 2011-02-02 15:43:45 UTC
Created attachment 23215 [details]
Archived preprocessed source

Could not attach the preprocessed source as plain text because of the attachment file size limit. Had to archive it.
Comment 2 Jonathan Wakely 2011-02-02 16:05:34 UTC
I think this is PR 45894
Comment 3 Jonathan Wakely 2011-02-02 16:08:14 UTC
confirmed as a dup - 4.5.2 doesn't ICE on the testcase, but reverting the fix for PR 45894 causes it to ICE

*** This bug has been marked as a duplicate of bug 45894 ***
Comment 4 Jonathan Wakely 2011-02-02 17:22:07 UTC
Created attachment 23220 [details]
reduced testcase
Comment 5 Jonathan Wakely 2011-02-02 23:18:48 UTC
I'm reopening this - although it's fixed in 4.5.2 by Jakub's patch for PR 45894  this ICE doesn't depend on -std=c++0x or -Wsequence-point, and the g++.dg/warn/Wsequence-point-2.C test doesn't compile on the 4.4 branch
Comment 6 Jonathan Wakely 2011-02-03 00:20:32 UTC
backported patch posted to http://gcc.gnu.org/ml/gcc-patches/2011-02/msg00176.html for approval
Comment 7 Jonathan Wakely 2011-02-03 22:34:57 UTC
Author: redi
Date: Thu Feb  3 22:34:51 2011
New Revision: 169813

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169813
Log:
2011-02-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR c++/47589
	Backport from mainline
	2010-11-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/45894
	* tree.c (lvalue_kind): Don't crash if ref has NULL type.


Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/pr47589.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/tree.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
Comment 8 Jonathan Wakely 2011-02-03 22:45:12 UTC
Author: redi
Date: Thu Feb  3 22:45:06 2011
New Revision: 169814

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169814
Log:
2011-02-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR c++/47589
	* g++.dg/pr47589.C: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/pr47589.C
Modified:
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Comment 9 Jonathan Wakely 2011-02-03 22:47:43 UTC
Author: redi
Date: Thu Feb  3 22:47:37 2011
New Revision: 169815

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169815
Log:
2011-02-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR c++/47589
	* g++.dg/pr47589.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/pr47589.C
Modified:
    trunk/gcc/testsuite/ChangeLog
Comment 10 Jonathan Wakely 2011-02-03 22:49:26 UTC
fixed for 4.4.6
Comment 11 Jonathan Wakely 2011-05-28 15:22:30 UTC
*** Bug 47588 has been marked as a duplicate of this bug. ***