diff options
author | Richard Guenther <rguenther@suse.de> | 2009-11-30 10:39:36 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-11-30 10:39:36 +0000 |
commit | ffab1d071ca78b02490bb39ae784d1ad45f4eb04 (patch) | |
tree | 70e5c4b5c8abb762105af6b9e0ae79b0bd32f9c8 /gcc/expr.c | |
parent | c84b434f46aabff791f59a45ec74c8b9a3cf32f2 (diff) | |
download | gcc-ffab1d071ca78b02490bb39ae784d1ad45f4eb04.zip gcc-ffab1d071ca78b02490bb39ae784d1ad45f4eb04.tar.gz gcc-ffab1d071ca78b02490bb39ae784d1ad45f4eb04.tar.bz2 |
re PR middle-end/42119 (internal compiler error: in expand_expr_addr_expr_1, at expr.c:6862)
2009-11-30 Richard Guenther <rguenther@suse.de>
PR middle-end/42119
PR fortran/38530
* expr.c (expand_expr_addr_expr_1): Properly expand the initializer
of CONST_DECLs.
* gfortran.dg/pr42119.f90: New testcase.
From-SVN: r154778
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -6840,9 +6840,8 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode, return expand_expr (TREE_OPERAND (exp, 0), target, tmode, modifier); case CONST_DECL: - /* Recurse and make the output_constant_def clause above handle this. */ - return expand_expr_addr_expr_1 (DECL_INITIAL (exp), target, - tmode, modifier, as); + /* Expand the initializer like constants above. */ + return XEXP (expand_expr_constant (DECL_INITIAL (exp), 0, modifier), 0); case REALPART_EXPR: /* The real part of the complex number is always first, therefore |