public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/95192] [11 Regression] ICE: tree check: expected tree_list,  have error_mark in handle_assume_aligned_attribute, at c-family/c-attribs.c:2996
Date: Fri, 04 Dec 2020 14:17:15 +0000	[thread overview]
Message-ID: <bug-95192-4-u04SCEJQPc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95192-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95192

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> In cp/parser.c, we have code that avoids building attributes with
> error_mark_node values (instead just use error_mark_node as the attributes).
> 
> So, I wonder if we shouldn't do that in tsubst_attributes too, like:
> --- gcc/cp/pt.c.jj	2020-11-18 09:40:09.618663053 +0100
> +++ gcc/cp/pt.c	2020-11-18 15:47:26.584181671 +0100
> @@ -11502,6 +11502,8 @@ tsubst_attribute (tree t, tree *decl_p,
>        tree chain
>  	= tsubst_expr (TREE_CHAIN (val), args, complain, in_decl,
>  		       /*integral_constant_expression_p=*/false);
> +      if (chain == error_mark_node)
> +	return error_mark_node;
>        if (chain != TREE_CHAIN (val))
>  	val = tree_cons (NULL_TREE, TREE_VALUE (val), chain);
>      }
> @@ -11524,8 +11526,12 @@ tsubst_attribute (tree t, tree *decl_p,
>        return list;
>      }
>    else
> -    val = tsubst_expr (val, args, complain, in_decl,
> -		       /*integral_constant_expression_p=*/false);
> +    {
> +      val = tsubst_expr (val, args, complain, in_decl,
> +			 /*integral_constant_expression_p=*/false);
> +      if (val == error_mark_node)
> +	return val;
> +    }
>  
>    if (val != TREE_VALUE (t))
>      return build_tree_list (TREE_PURPOSE (t), val);
> 
> Except that we accept the testcase then rather than reject - the unification
> is done with complain == 0...

Are you planning Jakub to send the patch candidate to the mailing list?

  parent reply	other threads:[~2020-12-04 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 19:57 [Bug c++/95192] New: " asolokha at gmx dot com
2020-05-18 20:03 ` [Bug c++/95192] " mpolacek at gcc dot gnu.org
2020-05-19  6:41 ` rguenth at gcc dot gnu.org
2020-10-16 11:45 ` rguenth at gcc dot gnu.org
2020-11-18 14:59 ` jakub at gcc dot gnu.org
2020-12-04 14:17 ` marxin at gcc dot gnu.org [this message]
2020-12-04 14:20 ` jakub at gcc dot gnu.org
2021-02-01 21:46 ` jason at gcc dot gnu.org
2021-02-04  2:38 ` cvs-commit at gcc dot gnu.org
2021-02-04  2:40 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-95192-4-u04SCEJQPc@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).