PATCH for c++/19407 (attributes on template parms)

Richard Guenther
Wed Sep 26 16:47:00 GMT 2007

On 9/23/07, Jason Merrill <> wrote:
> It's nice to have all these PRs with different testcases, as it means I
> have to keep refining my code to make it deal with the different
> situations.  I wasn't very happy with my first pass, but I'm quite
> pleased with the code now.
> This patch deals with the problem that we didn't know how to deal with
> applying attributes to template type parms: now we can just defer all of
> them until instantiation time.

I don't know if exactly this patch is the culprit, but I see segfaults
with tramp3d
since 070924:

Starting program: /abuild/rguenther/gimple-types-g/gcc/cc1plus -quiet
-O0 /space/rguenther/tramp3d/tramp3d-v4.ii

Program received signal SIGSEGV, Segmentation fault.
0x0000000000545c5a in is_late_template_attribute (attr=0x2b2f2b957b70,
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/decl2.c:994
994       else if (TREE_CODE (decl) == TYPE_DECL || spec->type_required)
(gdb) print spec
$1 = (const struct attribute_spec *) 0x0
(gdb) call debug_tree (decl)
 <function_decl 0x2b2f2f438a00 evaluate
    type <function_type 0x2b2f2bd620d0

You can find tramp3d-v4.cpp source at


More information about the Gcc-patches mailing list