re PR target/43070 (g++.dg/ext/label2.C fails to compile at -O1)
PR c++/43070 * semantics.c (finish_goto_stmt): Don't call decay_conversion. From-SVN: r156872
This commit is contained in:
parent
bb7dcd0ef3
commit
7890246f66
@ -1,5 +1,8 @@
|
||||
2010-02-18 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43070
|
||||
* semantics.c (finish_goto_stmt): Don't call decay_conversion.
|
||||
|
||||
PR c++/26261
|
||||
PR c++/43101
|
||||
* pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
|
||||
|
@ -546,10 +546,8 @@ finish_goto_stmt (tree destination)
|
||||
TREE_USED (destination) = 1;
|
||||
else
|
||||
{
|
||||
/* The DESTINATION is being used as an rvalue. */
|
||||
if (!processing_template_decl)
|
||||
{
|
||||
destination = decay_conversion (destination);
|
||||
destination = cp_convert (ptr_type_node, destination);
|
||||
if (error_operand_p (destination))
|
||||
return NULL_TREE;
|
||||
|
@ -1,5 +1,9 @@
|
||||
2010-02-18 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43070
|
||||
* g++.dg/ext/label1.C: Update.
|
||||
* g++.dg/ext/label2.C: Update.
|
||||
|
||||
PR c++/26261
|
||||
* g++.dg/template/dependent-name6.C: New.
|
||||
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
int main(void) {
|
||||
static const void* lbls[2][2] = {{&&lbl0, &&lbl0}, {&&lbl0, &&lbl0}};
|
||||
goto *lbls[0];
|
||||
goto *lbls[0][0];
|
||||
goto *lbls[0][0][0]; // { dg-message "" }
|
||||
goto *lbls[0]; // { dg-error "" }
|
||||
lbl0:
|
||||
;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ void f() {
|
||||
l:
|
||||
void *p[] = { &&l };
|
||||
|
||||
goto *p;
|
||||
goto *p[0];
|
||||
}
|
||||
|
||||
template void f<int>();
|
||||
|
Loading…
Reference in New Issue
Block a user