From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7084 invoked by alias); 17 Mar 2011 12:41:21 -0000 Received: (qmail 7075 invoked by uid 22791); 17 Mar 2011 12:41:20 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Mar 2011 12:41:14 +0000 From: "martin.kronbichler at it dot uu.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/48166] New: ICE on static member function with invalid type qualifier X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: martin.kronbichler at it dot uu.se X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Thu, 17 Mar 2011 12:53:00 -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 X-SW-Source: 2011-03/txt/msg01821.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48166 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: unassigned@gcc.gnu.org ReportedBy: martin.kronbichler@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 for instructions. The code is clearly invalid (g++ 4.5 indeed gives the following error messa= ge: "test_static.cc:4:19: error: static member function =E2=80=98void foo::func= ()=E2=80=99 declared with type qualifiers"), but g++ 4.6 returns with an ICE.