Patchwork [GOOGLE] Fix an ICE in lipo_cmp_type

login
register
mail settings
Submitter Dehao Chen
Date Sept. 26, 2013, 4:26 p.m.
Message ID <CAO2gOZVGHzxedUh8r8aYJAaCz0koYP0K+CVy8zLzPmGjj1Nc1A@mail.gmail.com>
Download mbox | patch
Permalink /patch/278226/
State New
Headers show

Comments

Dehao Chen - Sept. 26, 2013, 4:26 p.m.
This fixes an ICE when lipo_cmp_type handles NULL_PTR_TYPE.

Bootstrapped and regression test on going?

OK for google branches?

Thanks,
Dehao
Xinliang David Li - Sept. 26, 2013, 4:28 p.m.
yes.

David

On Thu, Sep 26, 2013 at 9:26 AM, Dehao Chen <dehao@google.com> wrote:
> This fixes an ICE when lipo_cmp_type handles NULL_PTR_TYPE.
>
> Bootstrapped and regression test on going?
>
> OK for google branches?
>
> Thanks,
> Dehao
>
> Index: gcc/l-ipo.c
> ===================================================================
> --- gcc/l-ipo.c (revision 202926)
> +++ gcc/l-ipo.c (working copy)
> @@ -713,6 +713,7 @@ lipo_cmp_type (tree t1, tree t2)
>                && lipo_cmp_type (TREE_TYPE (t1), TREE_TYPE (t2)));
>      case VOID_TYPE:
>      case BOOLEAN_TYPE:
> +    case NULLPTR_TYPE:
>        return 1;
>      case TEMPLATE_TYPE_PARM:
>        return 1;

Patch

Index: gcc/l-ipo.c
===================================================================
--- gcc/l-ipo.c (revision 202926)
+++ gcc/l-ipo.c (working copy)
@@ -713,6 +713,7 @@  lipo_cmp_type (tree t1, tree t2)
               && lipo_cmp_type (TREE_TYPE (t1), TREE_TYPE (t2)));
     case VOID_TYPE:
     case BOOLEAN_TYPE:
+    case NULLPTR_TYPE:
       return 1;
     case TEMPLATE_TYPE_PARM:
       return 1;