[Bug c++/84942] [6/7/8 Regression] internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84942 --- Comment #5 from Alexandre Oliva --- Author: aoliva Date: Fri Mar 23 01:18:48 2018 New Revision: 258790 URL: https://gcc.gnu.org/viewcvs?rev=258790=gcc=rev Log: Disable auto_is_implicit_function_template_parm_p while parsing attributes We don't want functions to become implicit templates just because of random uses of auto in unexpected places. Disabling the special handling of auto while parsing attributes, for example, makes for more sensible errors. for gcc/cp/ChangeLog PR c++/84610 PR c++/84642 PR c++/84942 * cp-tree.h (temp_override): New template class, generalizing a cleanup that was only used... * parser.c (cp_parser_parameter_declaration_clause): ... here for auto_is_implicit_function_template_parm_p. (cp_parser_gnu_attributes_opt): Use it here as well. (cp_parser_std_attribute): Likewise. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/parser.c
[Bug c++/84942] [6/7/8 Regression] internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84942 Alexandre Oliva changed: What|Removed |Added Status|NEW |UNCONFIRMED CC||aoliva at gcc dot gnu.org Ever confirmed|1 |0 --- Comment #4 from Alexandre Oliva --- This patch fixes the 'auto' parsing problem: https://gcc.gnu.org/ml/gcc-patches/2018-03/msg01141.html
[Bug c++/84942] [6/7/8 Regression] internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84942 --- Comment #3 from Jakub Jelinek --- Created attachment 43700 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43700=edit gcc8-pr84942.patch Full untested patch.
[Bug c++/84942] [6/7/8 Regression] internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84942 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Using cp_build_unary_op for FIX_TRUNC_EXPR looks wrong to me, that function uses the type of the operand as the type of the unary expression. Perhaps: --- gcc/cp/pt.c.jj 2018-03-16 21:11:04.440773108 +0100 +++ gcc/cp/pt.c 2018-03-19 10:58:39.803657613 +0100 @@ -17495,8 +17495,10 @@ tsubst_copy_and_build (tree t, complain|decltype_flag)); case FIX_TRUNC_EXPR: - RETURN (cp_build_unary_op (FIX_TRUNC_EXPR, RECUR (TREE_OPERAND (t, 0)), -false, complain)); + op1 = RECUR (TREE_OPERAND (t, 0)); + if (error_operand_p (op1)) +RETURN (error_mark_node); + RETURN (build1 (FIX_TRUNC_EXPR, TREE_TYPE (t), op1)); case ADDR_EXPR: op1 = TREE_OPERAND (t, 0);
[Bug c++/84942] [6/7/8 Regression] internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84942 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug c++/84942] [6/7/8 Regression] internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84942 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-03-19 CC||mpolacek at gcc dot gnu.org Target Milestone|--- |6.5 Summary|internal compiler error: in |[6/7/8 Regression] internal |fold_convert_const_int_from |compiler error: in |_real, at fold-const.c:2011 |fold_convert_const_int_from ||_real, at fold-const.c:2011 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Started with r230365.