[Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-06-21 08:58 --- Patch which fixes this bug: Index: builtins.c === --- builtins.c (revision 125776) +++ builtins.c (working copy) @@ -4649,7 +4649,18 @@ std_expand_builtin_va_start (tree valist, rtx nextarg) { tree t; - t = make_tree (sizetype, nextarg); + /* Use the correct type/mode for make_tree, can't use a pointer type as + PLUS_EXPR is not appliable to pointers. type_for_mode might return + a type with a different mode (SI vs PSI) so we might need to convert + to the different mode. */ + tree type = lang_hooks.types.type_for_mode (TYPE_MODE (ptr_type_node), true); + if (TYPE_MODE (type) != GET_MODE (nextarg)) +{ + rtx reg = gen_reg_rtx (TYPE_MODE (type)); + convert_move (reg, nextarg, false); + nextarg = reg; +} + t = make_tree (type, nextarg); t = fold_convert (ptr_type_node, t); t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist, t); -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-06-21 08:58:35 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32441
[Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
--- Comment #4 from rguenth at gcc dot gnu dot org 2007-06-21 11:00 --- You shouldn't introduce calls to langhooks. Why not use mode_for_size? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32441
[Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
--- Comment #5 from pinskia at gmail dot com 2007-06-21 13:47 --- Subject: Re: ICE in expand_expr_real_1, at expr.c:7109 You shouldn't introduce calls to langhooks. Why not use mode_for_size? I was just copying code from fold-const.c. I have the mode already, I need an integer tree type that matches that mode. So really mode_for_size will not give me any more information. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32441
[Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
--- Comment #1 from rask at sygehus dot dk 2007-06-20 21:36 --- Created an attachment (id=13750) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13750action=view) Preprocessed testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32441
[Bug target/32441] ICE in expand_expr_real_1, at expr.c:7109
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-06-20 22:05 --- This is more likely related to pointer_plus than dataflow. Looking into it. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32441