public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/98277] New: d: ICE in gimplify_expr, at gimplify.c
@ 2020-12-14 14:28 ibuclaw at gdcproject dot org
  2020-12-15 21:25 ` [Bug d/98277] " cvs-commit at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-12-14 14:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98277

            Bug ID: 98277
           Summary: d: ICE in gimplify_expr, at gimplify.c
           Product: gcc
           Version: 9.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ibuclaw at gdcproject dot org
  Target Milestone: ---

This happens when using an enum member in a ternary condition for a function
that returns by reference.

---
enum Side
{
    left
}

int left;
int right;

ref int get(Side side)
{
    return side == Side.left ? left : right;
}
---

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/98277] d: ICE in gimplify_expr, at gimplify.c
  2020-12-14 14:28 [Bug d/98277] New: d: ICE in gimplify_expr, at gimplify.c ibuclaw at gdcproject dot org
@ 2020-12-15 21:25 ` cvs-commit at gcc dot gnu.org
  2020-12-15 21:25 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-15 21:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98277

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:36c9a3fe3f3c200ad3937d00d339b7269cf07adb

commit r11-6099-g36c9a3fe3f3c200ad3937d00d339b7269cf07adb
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Dec 15 10:36:00 2020 +0100

    d: Fix ICE in gimplify_expr, at gimplify.c (PR98277)

    The DMD front-end shouldn't, but can sometimes leak manifest constants
    in the AST passed to the code generator.  To prevent this being an
    issue, the setting of DECL_INITIAL has been moved to the point where the
    CONST_DECL is used, rather than in the declaration handler.

    gcc/d/ChangeLog:

            PR d/98277
            * decl.cc (DeclVisitor::visit (VarDeclaration *)): Move setting of
            DECL_INITIAL for manifest constants to ...
            (get_symbol_decl): ... here.

    gcc/testsuite/ChangeLog:

            PR d/98277
            * gdc.dg/pr98277.d: New test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/98277] d: ICE in gimplify_expr, at gimplify.c
  2020-12-14 14:28 [Bug d/98277] New: d: ICE in gimplify_expr, at gimplify.c ibuclaw at gdcproject dot org
  2020-12-15 21:25 ` [Bug d/98277] " cvs-commit at gcc dot gnu.org
@ 2020-12-15 21:25 ` cvs-commit at gcc dot gnu.org
  2020-12-15 21:27 ` cvs-commit at gcc dot gnu.org
  2020-12-15 21:28 ` ibuclaw at gdcproject dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-15 21:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98277

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:d0bdf3a9069f8f42b2ab196db2c4d75937722646

commit r10-9154-gd0bdf3a9069f8f42b2ab196db2c4d75937722646
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Dec 15 10:36:00 2020 +0100

    d: Fix ICE in gimplify_expr, at gimplify.c (PR98277)

    The DMD front-end shouldn't, but can sometimes leak manifest constants
    in the AST passed to the code generator.  To prevent this being an
    issue, the setting of DECL_INITIAL has been moved to the point where the
    CONST_DECL is used, rather than in the declaration handler.

    gcc/d/ChangeLog:

            PR d/98277
            * decl.cc (DeclVisitor::visit (VarDeclaration *)): Move setting of
            DECL_INITIAL for manifest constants to ...
            (get_symbol_decl): ... here.

    gcc/testsuite/ChangeLog:

            PR d/98277
            * gdc.dg/pr98277.d: New test.

    (cherry picked from commit 36c9a3fe3f3c200ad3937d00d339b7269cf07adb)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/98277] d: ICE in gimplify_expr, at gimplify.c
  2020-12-14 14:28 [Bug d/98277] New: d: ICE in gimplify_expr, at gimplify.c ibuclaw at gdcproject dot org
  2020-12-15 21:25 ` [Bug d/98277] " cvs-commit at gcc dot gnu.org
  2020-12-15 21:25 ` cvs-commit at gcc dot gnu.org
@ 2020-12-15 21:27 ` cvs-commit at gcc dot gnu.org
  2020-12-15 21:28 ` ibuclaw at gdcproject dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-15 21:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98277

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:85b55ae6e87bd5cf6a23175065f634614e96a243

commit r9-9116-g85b55ae6e87bd5cf6a23175065f634614e96a243
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Dec 15 10:36:00 2020 +0100

    d: Fix ICE in gimplify_expr, at gimplify.c (PR98277)

    The DMD front-end shouldn't, but can sometimes leak manifest constants
    in the AST passed to the code generator.  To prevent this being an
    issue, the setting of DECL_INITIAL has been moved to the point where the
    CONST_DECL is used, rather than in the declaration handler.

    gcc/d/ChangeLog:

            PR d/98277
            * decl.cc (DeclVisitor::visit (VarDeclaration *)): Move setting of
            DECL_INITIAL for manifest constants to ...
            (get_symbol_decl): ... here.

    gcc/testsuite/ChangeLog:

            PR d/98277
            * gdc.dg/pr98277.d: New test.

    (cherry picked from commit 36c9a3fe3f3c200ad3937d00d339b7269cf07adb)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug d/98277] d: ICE in gimplify_expr, at gimplify.c
  2020-12-14 14:28 [Bug d/98277] New: d: ICE in gimplify_expr, at gimplify.c ibuclaw at gdcproject dot org
                   ` (2 preceding siblings ...)
  2020-12-15 21:27 ` cvs-commit at gcc dot gnu.org
@ 2020-12-15 21:28 ` ibuclaw at gdcproject dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-12-15 21:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98277

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Fix committed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-15 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 14:28 [Bug d/98277] New: d: ICE in gimplify_expr, at gimplify.c ibuclaw at gdcproject dot org
2020-12-15 21:25 ` [Bug d/98277] " cvs-commit at gcc dot gnu.org
2020-12-15 21:25 ` cvs-commit at gcc dot gnu.org
2020-12-15 21:27 ` cvs-commit at gcc dot gnu.org
2020-12-15 21:28 ` ibuclaw at gdcproject dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).