This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/65727] New: Segfault With Decltype In Lambda Expression Used To Initialize Static Class Member


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 <http://gcc.gnu.org/bugs.html> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]