Bug 34939 - [4.1/4.2 regression] ICE with friend and attribute weak
Summary: [4.1/4.2 regression] ICE with friend and attribute weak
Status: RESOLVED DUPLICATE of bug 34937
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P2 normal
Target Milestone: 4.1.3
Assignee: Jason Merrill
URL:
Keywords: ice-on-valid-code, monitored
Depends on: 34937
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-23 07:55 UTC by Volker Reichelt
Modified: 2008-05-02 21:44 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-02-13 19:31:48


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2008-01-23 07:55:07 UTC
The following valid code snippet triggers an ICE since GCC 3.0:

============================================
template<int> void foo();

template<typename> struct A
{
  friend void foo<0>() __attribute((weak));
};
============================================

bug.cc:6: internal compiler error: tree check: expected tree that contains 'decl non-common' structure, have 'overload' in decl_is_template_id, at cp/mangle.c:325
Please submit a full bug report, [etc.]
Comment 1 Richard Biener 2008-01-23 10:58:52 UTC
Confirmed.  Related to PR34937.
Comment 2 Jakub Jelinek 2008-02-14 10:49:00 UTC
Subject: Bug 34962

Author: jason
Date: Wed Feb 13 21:27:16 2008
New Revision: 132297

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132297
Log:
        PR c++/34962, c++/34937, c++/34939
        * decl2.c (is_late_template_attribute): Always defer attributes
        vector_size and weak.

Added:
    trunk/gcc/testsuite/g++.dg/ext/tmplattr9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl2.c
Comment 3 Jason Merrill 2008-05-02 21:44:43 UTC

*** This bug has been marked as a duplicate of 34937 ***