Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • New: ICE with invalid const static variable

    10 answers - 497 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    The following invalid code snippet triggers an ICE since GCC 4.1.0:
    template<intstruct A
    {
    static const int i;
    };
    template<int Nstruct B
    {
    char c[A<N>::i], d;
    };
    B<0b;
    bug.cc: In instantiation of 'B<0>':
    bug.cc:11: instantiated from here
    bug.cc:7: internal compiler error: tree check: expected integer_cst, have
    nop_expr in walk_subobject_offsets, at cp/class.c:3126
    Please submit a full bug report, [etc.]
  • No.1 | | 131 bytes | |

    --
    reichelt at gcc dot gnu dot org changed:
    What |Removed |Added
    Target Milestone| |4.1.2
  • No.2 | | 206 bytes | |

    Comment #1 from janis at gcc dot gnu dot org 2006-08-11 22:24
    A regression hunt on powerpc-linux identified the following patch:
    r106566 | mmitchel | 2005-11-06 19:41:18 +0000 (Sun, 06 Nov 2005)
  • No.3 | | 88 bytes | |

    Comment #2 from reichelt at gcc dot gnu dot org 2006-08-14 19:02
    Confirmed by Janis.
  • No.4 | | 122 bytes | |

    --
    mmitchel at gcc dot gnu dot org changed:
    What |Removed |Added
    Priority|P3 |P2
  • No.5 | | 213 bytes | |

    --
    mmitchel at gcc dot gnu dot org changed:
    What |Removed |Added
    AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
    |dot org |
    Status|NEW |ASSIGNED
  • No.6 | | 1641 bytes | |

    Comment #3 from mmitchel at gcc dot gnu dot org 2006-08-26 16:23
    Subject: Bug 28595

    Author: mmitchel
    Date: Sat Aug 26 16:23:33 2006
    New Revision: 116468

    URL:
    Log:
    PR c++/28588
    * class.c (): Add
    access_path parameter. Perform access checks.
    (instantiate_type): Adjust call to
    Remove unnecessary code.
    * tree.c (is_overloaded_fn): Document. Return 2 when there are
    acutally multiple functions.
    (really_overloaded_fn): Use is_overloaded_fn.
    * mangle.c (write_expression): Handle BASELINKs.
    * cp-tree.h (really_overloaded_fn): Return bool.
    (baselink_for_fns): Declare.
    * search.c (lookup_member): Check access for single static
    functions here.
    * pt.c (): Handle BASELINKs.
    (tsubst_copy_and_build): Generate BASELINKs for template-ids.
    * semantics.c (finish_call_expr): Use baselink_for_fns.
    (baselink_for_fns): New function.
    (finish_id_expression): Use it.
    * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
    PR c++/28595
    * pt.c (tsubst): Issue errors about attempts to create VLAs at
    template-instantiation time.
    PR c++/28588
    * gdg/inherit/access6.C: New test.
    * gdg/inherit/access7.C: Likewise.
    PR c++/28595
    * gdg/template/array15.C: New test.
    * gdg/template/crash2.C: Tweak error markers.

    Added:

    Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/mangle.c
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/search.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/cp/tree.c
    trunk/gcc/testsuite/ChangeLog
  • No.7 | | 84 bytes | |

    Comment #4 from mmitchel at gcc dot gnu dot org 2006-08-26 16:38
    Fixed in 4.2.0.
  • No.8 | | 444 bytes | |

    Comment #5 from mmitchel at gcc dot gnu dot org 2006-08-26 17:14
    Subject: Bug 28595

    Author: mmitchel
    Date: Sat Aug 26 17:13:52 2006
    New Revision: 116471

    URL:
    Log:
    PR c++/28595
    * pt.c (tsubst): Issue errors about attempts to create VLAs at
    template-instantiation time.
    PR c++/28595
    * gdg/template/array15.C: New test.
    * gdg/template/crash2.C: Tweak error markers.

    Added:

    Modified:
  • No.9 | | 84 bytes | |

    Comment #6 from mmitchel at gcc dot gnu dot org 2006-08-26 17:14
    Fixed in 4.1.2.
  • No.10 | | 84 bytes | |

    Comment #7 from mmitchel at gcc dot gnu dot org 2006-08-26 17:16
    Fixed in 4.1.2.

Re: New: ICE with invalid const static variable


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Development"

EMSDN.COM