Commit b88b7ced by Andrew Pinski Committed by Andrew Pinski

re PR c++/24582 (ICE in decl_jump_unsafe)

2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/24582
        * g++.dg/init/switch1.C: New test.

2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/24582
        * decl.c (declare_local_label): Return 0 for variables
        with error_mark_node as their types.

From-SVN: r106434
parent f9c4ee6d
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/24582
* decl.c (declare_local_label): Return 0 for variables
with error_mark_node as their types.
2005-11-02 Mark Mitchell <mark@codesourcery.com> 2005-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/22434 PR c++/22434
......
...@@ -2147,7 +2147,8 @@ declare_local_label (tree id) ...@@ -2147,7 +2147,8 @@ declare_local_label (tree id)
static int static int
decl_jump_unsafe (tree decl) decl_jump_unsafe (tree decl)
{ {
if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl)) if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl)
|| TREE_TYPE (decl) == error_mark_node)
return 0; return 0;
if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)) if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl))
......
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/24582
* g++.dg/init/switch1.C: New test.
2005-11-03 Eric Botcazou <ebotcazou@libertysurf.fr> 2005-11-03 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/delay-slot-1.c: New test. * gcc.dg/delay-slot-1.c: New test.
int f(int c)
{
switch (c)
{
case d: /* { dg-error "'d' was not declared" } */
int optBzip2 = true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment