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++/57827] New: compiler segmentation fault


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57827

            Bug ID: 57827
           Summary: compiler segmentation fault
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liweifriends at gmail dot com

When build the following code with GCC 4.8.1:

struct C
{
    constexpr int fun (int x)
    {
        return x + 1;
    }

    int a = 2;
    int b = fun(a);
};

C c;

int main() {}

GCC told me : 

internal compiler error : segmentation fault.

In my opinion, it should present more meaningful result, such as the non-static
function 'fun' cannot be used in inline initialization ...


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