re PR c++/23089 (internal compiler error: in int_mode_for_mode, at stor-layout.c:251 at -O1)
PR c++/23089 * decl.c (require_complete_types_for_parms): Mark incomplete types as invalid. * g++.dg/other/incomplete1.C: New test. From-SVN: r103336
This commit is contained in:
parent
70a39602ab
commit
dff1b563b3
@ -1,3 +1,9 @@
|
||||
2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/23089
|
||||
* decl.c (require_complete_types_for_parms): Mark incomplete types
|
||||
as invalid.
|
||||
|
||||
2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
* parser.c (cp_parser_nth_token_starts_template_argument_list_p):
|
||||
|
@ -8305,14 +8305,16 @@ require_complete_types_for_parms (tree parms)
|
||||
{
|
||||
if (dependent_type_p (TREE_TYPE (parms)))
|
||||
continue;
|
||||
if (VOID_TYPE_P (TREE_TYPE (parms)))
|
||||
/* grokparms will have already issued an error. */
|
||||
TREE_TYPE (parms) = error_mark_node;
|
||||
else if (complete_type_or_else (TREE_TYPE (parms), parms))
|
||||
if (!VOID_TYPE_P (TREE_TYPE (parms))
|
||||
&& complete_type_or_else (TREE_TYPE (parms), parms))
|
||||
{
|
||||
relayout_decl (parms);
|
||||
DECL_ARG_TYPE (parms) = type_passed_as (TREE_TYPE (parms));
|
||||
}
|
||||
else
|
||||
/* grokparms or complete_type_or_else will have already issued
|
||||
an error. */
|
||||
TREE_TYPE (parms) = error_mark_node;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/23089
|
||||
* g++.dg/other/incomplete1.C: New test.
|
||||
|
||||
2005-08-22 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
* gcc.dg/vect/vect-22.c: Add test for float. All four loops
|
||||
|
7
gcc/testsuite/g++.dg/other/incomplete1.C
Normal file
7
gcc/testsuite/g++.dg/other/incomplete1.C
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/23089
|
||||
// Origin: Flash Sheridan <flash@pobox.com>
|
||||
// ICE on incomplete type
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O" }
|
||||
|
||||
void foo(struct A) {} // { dg-error "incomplete type|forward declaration" }
|
Loading…
Reference in New Issue
Block a user