------- Comment #1 from rguenth at gcc dot gnu dot org 2009-11-20 15:33 ------- Confirmed. Sth as simple as
Index: gcc/expr.c =================================================================== --- gcc/expr.c (revision 154364) +++ gcc/expr.c (working copy) @@ -6834,7 +6834,8 @@ expand_expr_addr_expr_1 (tree exp, rtx t /* ??? This should be considered a front-end bug. We should not be generating ADDR_EXPR of something that isn't an LVALUE. The only exception here is STRING_CST. */ - if (CONSTANT_CLASS_P (exp)) + if (CONSTANT_CLASS_P (exp) + || (TREE_CODE (exp) == ADDR_EXPR && TREE_CONSTANT (exp))) return XEXP (expand_expr_constant (exp, 0, modifier), 0); /* Everything must be something allowed by is_gimple_addressable. */ might fix it, though the recursion in this function for CONST_DECLs make it a bit convoluted to call it obvious. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|fortran |middle-end Ever Confirmed|0 |1 Keywords| |ice-on-valid-code Known to fail| |4.5.0 Last reconfirmed|0000-00-00 00:00:00 |2009-11-20 15:33:46 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42119