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

           Summary: ICE on static member function with invalid type
                    qualifier
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: martin.kronbich...@it.uu.se


Using gcc version 4.6.0 20110317 (svn revision 171087) on x86-64 Linux with the
code

struct foo {
  static void func ();
};
void foo::func () const {};

and compile line "g++ -c test_static.cc" gives the following:

test_static.cc:4:19: internal compiler error: in merge_types, at
cp/typeck.c:825
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The code is clearly invalid (g++ 4.5 indeed gives the following error message:
"test_static.cc:4:19: error: static member function ‘void foo::func()’ declared
with type qualifiers"), but g++ 4.6 returns with an ICE.

Reply via email to