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 ...

Reply via email to