Bug 20022

Summary: [4.0 Regression] -fno-access-control is broken
Product: gcc Reporter: Caolan McNamara <caolanm>
Component: c++Assignee: Alexandre Oliva <aoliva>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, jakub
Priority: P2 Keywords: ice-on-valid-code
Version: 4.0.0   
Target Milestone: 4.0.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2005-02-17 16:42:54
Attachments: bzip2 compressed preprocessed source dump

Description Caolan McNamara 2005-02-17 08:50:30 UTC
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3
--enable-languages=c,c++,java,f95 --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050216 (Red Hat 4.0.0-0.24)

---

------------------------------
Making: ../../../../unxlngi6.pro/slo/sw_atrfld.obj
g++4 -Wreturn-type -fmessage-length=0 -c -I.  -I. -I../inc -I../../../../inc
-I../../../../inc/bf_sw -I../../../../unx/inc -I../../../../unxlngi6.pro/inc -I.
-I/usr/src/redhat/BUILD/SRC680_m77/solver/680/unxlngi6.pro/inc/stl
-I/usr/src/redhat/BUILD/SRC680_m77/solver/680/unxlngi6.pro/inc/external
-I/usr/src/redhat/BUILD/SRC680_m77/solver/680/unxlngi6.pro/inc
-I/usr/src/redhat/BUILD/SRC680_m77/solenv/unxlngi6/inc
-I/usr/src/redhat/BUILD/SRC680_m77/solenv/inc
-I/usr/src/redhat/BUILD/SRC680_m77/res
-I/usr/src/redhat/BUILD/SRC680_m77/solver/680/unxlngi6.pro/inc/stl
-I/usr/src/redhat/BUILD/SRC680_m77/solenv/inc/Xp31 -I/usr/include
-I/usr/X11R6/include     -Is:/solar/inc/hm -I../../../../res -I. -Wuninitialized
-g1 -Os -fno-strict-aliasing  -fno-access-control -pipe -mtune=pentiumpro
-Wno-ctor-dtor-privacy -fno-exceptions   -fpic -DLINUX -DUNX -DVCL -DGCC -DC341
-DINTEL -DGXX_INCLUDE_PATH=/usr/include/c++/3.4.3 -DCVER=C341 -D_USE_NAMESPACE
-DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1
-DSTLPORT_VERSION=400 -DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX
-DCPPU_ENV=gcc3 -DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0
-DOPTIMIZE -DEXCEPTIONS_OFF -DCUI -DSOLAR_JAVA -DSRC680   -DNUM_RELSPACE
-DVERTICAL_LAYOUT -DACCESSIBLE_LAYOUT -DBIDI -DSHAREDLIB -D_DLL_  -DMULTITHREAD
 -o ../../../../unxlngi6.pro/slo/sw_atrfld.o
/usr/src/redhat/BUILD/SRC680_m77/binfilter/bf_sw/source/core/txtnode/sw_atrfld.cxx
../../../../inc/bf_sw/horiornt.hxx:89: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed source stored into /tmp/ccHn4TcI.out file, please attach this to
your bugreport.
dmake:  Error code 1, while making '../../../../unxlngi6.pro/slo/sw_atrfld.obj'
'---* tg_merge.mk *---'
Comment 1 Caolan McNamara 2005-02-17 08:51:27 UTC
Created attachment 8211 [details]
bzip2 compressed preprocessed source dump
Comment 2 Andrew Pinski 2005-02-17 13:03:28 UTC
../../../../inc/bf_sw/horiornt.hxx:89: internal compiler error: vector VEC(deferred_access) last domain 
error, in perform_deferred_access_checks at cp/semantics.c:288
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Confirmed, reduced testcase:
enum A{};

-fno-access-control is broken.
Comment 3 CVS Commits 2005-02-17 16:42:26 UTC
Subject: Bug 20022

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	aoliva@gcc.gnu.org	2005-02-17 16:42:10

Modified files:
	gcc/cp         : ChangeLog semantics.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/other: access3.C 

Log message:
	gcc/cp/ChangeLog:
	PR c++/20022
	* semantics.c (perform_deferred_access_checks): Use
	get_deferred_access_checks to get the top of the stack.
	gcc/testsuite/ChangeLog:
	PR c++/20022
	* g++.dg/other/access3.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4631&r2=1.4632
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.460&r2=1.461
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5042&r2=1.5043
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/access3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 4 Alexandre Oliva 2005-02-17 16:43:58 UTC
Fixed with the patch above.