From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33528 invoked by alias); 10 Apr 2015 01:19:49 -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 33477 invoked by uid 48); 10 Apr 2015 01:19:44 -0000 From: "mmccurry at gatech dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65727] New: Segfault With Decltype In Lambda Expression Used To Initialize Static Class Member Date: Fri, 10 Apr 2015 01:19: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-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: mmccurry at gatech dot edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg00775.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65727 Bug ID: 65727 Summary: Segfault With Decltype In Lambda Expression Used To Initialize Static Class Member Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mmccurry at gatech dot edu Created attachment 35284 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35284&action=edit Minimal Test Case Using version 4.8.2 of g++ in an x86 environment, a segfault is possible with the attached code The build of this compiler was performed via the following slackware build script ftp://ftp.slackware.com/pub/slackware/slackware-14.1/source/d/gcc/gcc.SlackBuild When the file is built, the following output is produced: --------------------------------------------------- $ g++ -std=c++11 gcc-4.8.2-bug.cpp gcc-4.8.2-bug.cpp: In lambda function: gcc-4.8.2-bug.cpp:22:55: internal compiler error: Segmentation fault type_b type_e::b = {{[](){decltype(function_c(type_e::d))::dummy();}}}; ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. --------------------------------------------------- It looks like there are some similar bugs which have been fixed in the past, but none of them seem to have the same requirements as this segfault. Additionally the codebase which produced this issue has been reported to produce segfaults in version 4.9.1 though it is unknown if this minimal test case produces the segfault in the more recent versions.