diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-08-29 23:11:14 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-08-29 23:11:14 +0000 |
commit | fc2b84778bb51750c841f53b1ba30950935cc901 (patch) | |
tree | 9804609df286984088c3db599152fdef7af2c07f /gcc/cp/pt.c | |
parent | d560a41c5c43524d82795ac4421eab2df6764e30 (diff) | |
download | gcc-fc2b84778bb51750c841f53b1ba30950935cc901.zip gcc-fc2b84778bb51750c841f53b1ba30950935cc901.tar.gz gcc-fc2b84778bb51750c841f53b1ba30950935cc901.tar.bz2 |
re PR middle-end/6196 (ICE in copy_to_mode_reg, at explow.c:711)
PR c++/6196
* pt.c (tsubst_copy_and_build): Correct handling of
address-of-label extension.
* semantics.c (finish_goto_stmt): The address of a label must go
through the lvalue-to-rvalue conversion.
PR c++/6196
* g++.dg/ext/label1.C: New test.
* g++.dg/ext/label2.C: Likewise.
From-SVN: r70932
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 45bec17..ff3518e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7972,6 +7972,8 @@ tsubst_copy_and_build (tree t, else op1 = tsubst_non_call_postfix_expression (op1, args, complain, in_decl); + if (TREE_CODE (op1) == LABEL_DECL) + return finish_label_address_expr (DECL_NAME (op1)); return build_x_unary_op (ADDR_EXPR, op1); case PLUS_EXPR: |