This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This bug is another ICE with an invalid in-class specialisation whcih can be shown with the following testcase:
struct A { template<template<int> class B> struct B<0>; };
For this testcase, maybe_process_partial_specialization is returning error_mark_node, but the calling function - shadow_tag doesn't check the return value. The attached patch adds in a check for maybe_process_partial_specialization returning error_mark_node and to return NULL_TREE from shadow_tag if it does.
Bootstrapped and regression tested on i686-pc-linux-gnu with no new failures, ok for mainline?
Cheers, Lee.
PR c++/28861 * decl.c (shadow_tag): Return error_mark_node if maybe_process_partial_specialization failed.
PR c++/28861 * g++.dg/template/spec32.C: New test. * g++.dg/parse/crash9.C: Adjust error markers.
Attachment:
pr28861.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |