From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29106 invoked by alias); 15 Apr 2013 07:39:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29080 invoked by uid 48); 15 Apr 2013 07:39:25 -0000 From: "dimhen at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56961] New: cycle between do_spec_1() / process_brace_body() / handle_braces() Date: Mon, 15 Apr 2013 07:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dimhen at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01431.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56961 Bug #: 56961 Summary: cycle between do_spec_1() / process_brace_body() / handle_braces() Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: dimhen@gmail.com $ cat x.cpp struct foo { }; typedef struct { volatile foo fields; } CSPHandleState; CSPHandleState a; void fn1 () { CSPHandleState b; b.fields = foo(); } $ g++ -O0 -c x.cpp x.cpp: In function 'void fn1()': x.cpp:12:16: error: passing 'volatile foo' as 'this' argument of 'foo& foo::operator=(const foo&)' discards qualifiers [-fpermissive] b.fields = foo(); ^ g++: internal compiler error: Segmentation fault (program cc1plus) 0x40950c execute /home/dimhen/src/gcc-current/gcc/gcc.c:2822 0x409769 do_spec_1 /home/dimhen/src/gcc-current/gcc/gcc.c:4614 0x40c4d9 process_brace_body /home/dimhen/src/gcc-current/gcc/gcc.c:5871 0x40c4d9 handle_braces /home/dimhen/src/gcc-current/gcc/gcc.c:5785 0x40a1fa do_spec_1 /home/dimhen/src/gcc-current/gcc/gcc.c:5268 0x40c4d9 process_brace_body /home/dimhen/src/gcc-current/gcc/gcc.c:5871 0x40c4d9 handle_braces /home/dimhen/src/gcc-current/gcc/gcc.c:5785 0x40a1fa do_spec_1 /home/dimhen/src/gcc-current/gcc/gcc.c:5268 0x40a5eb do_spec_1 /home/dimhen/src/gcc-current/gcc/gcc.c:5373 0x40c4d9 process_brace_body /home/dimhen/src/gcc-current/gcc/gcc.c:5871 0x40c4d9 handle_braces /home/dimhen/src/gcc-current/gcc/gcc.c:5785 0x40a1fa do_spec_1 /home/dimhen/src/gcc-current/gcc/gcc.c:5268 0x40c4d9 process_brace_body /home/dimhen/src/gcc-current/gcc/gcc.c:5871 0x40c4d9 handle_braces /home/dimhen/src/gcc-current/gcc/gcc.c:5785 0x40a1fa do_spec_1 /home/dimhen/src/gcc-current/gcc/gcc.c:5268 0x40c4d9 process_brace_body /home/dimhen/src/gcc-current/gcc/gcc.c:5871 0x40c4d9 handle_braces /home/dimhen/src/gcc-current/gcc/gcc.c:5785 0x40a1fa do_spec_1 /home/dimhen/src/gcc-current/gcc/gcc.c:5268 0x40c4d9 process_brace_body /home/dimhen/src/gcc-current/gcc/gcc.c:5871 0x40c4d9 handle_braces /home/dimhen/src/gcc-current/gcc/gcc.c:5785 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Thanks to David Blaikie for reduced testcase (http://lists.cs.uiuc.edu/pipermail/cfe-users/2013-April/000085.html)