public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/96254] New: d: ICE using non-local variable: internal compiler error: Segmentation fault
@ 2020-07-20 22:40 ibuclaw at gdcproject dot org
  2020-08-03 10:00 ` [Bug d/96254] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-07-20 22:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96254
           Summary: d: ICE using non-local variable: internal compiler
                    error: Segmentation fault
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ibuclaw at gdcproject dot org
  Target Milestone: ---

---
struct map(alias fun)
{
    @property run()
    {
    }
}

struct Task(Args)
{
    Args _args;
}

template reduce(functions...)
{
    auto reduce(Args)(Args args)
    {
        alias RTask = Task!(typeof(args));
        auto task = RTask();
    }
}

void main()
{
    immutable delta = 1;
    reduce!"a + b"(map!({ immutable x = delta; })());
}

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

* [Bug d/96254] d: ICE using non-local variable: internal compiler error: Segmentation fault
  2020-07-20 22:40 [Bug d/96254] New: d: ICE using non-local variable: internal compiler error: Segmentation fault ibuclaw at gdcproject dot org
@ 2020-08-03 10:00 ` cvs-commit at gcc dot gnu.org
  2020-08-20 23:10 ` cvs-commit at gcc dot gnu.org
  2020-08-20 23:13 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-03 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:2b1c2a4bd9fb555dccde5d67d6da64547064e0e6

commit r11-2497-g2b1c2a4bd9fb555dccde5d67d6da64547064e0e6
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Jul 21 19:59:00 2020 +0200

    d: Fix ICE using non-local variable: internal compiler error: Segmentation
fault

    Moves no frame access error to own function, adding use of it for both
    when get_framedecl() cannot find a path to the outer function frame, and
    guarding get_decl_tree() from recursively calling itself.

    gcc/d/ChangeLog:

            PR d/96254
            * d-codegen.cc (error_no_frame_access): New.
            (get_frame_for_symbol): Use fdparent name in error message.
            (get_framedecl): Replace call to assert with error.
            * d-tree.h (error_no_frame_access): Declare.
            * decl.cc (get_decl_tree): Detect recursion and error.

    gcc/testsuite/ChangeLog:

            PR d/96254
            * gdc.dg/pr96254a.d: New test.
            * gdc.dg/pr96254b.d: New test.

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

* [Bug d/96254] d: ICE using non-local variable: internal compiler error: Segmentation fault
  2020-07-20 22:40 [Bug d/96254] New: d: ICE using non-local variable: internal compiler error: Segmentation fault ibuclaw at gdcproject dot org
  2020-08-03 10:00 ` [Bug d/96254] " cvs-commit at gcc dot gnu.org
@ 2020-08-20 23:10 ` cvs-commit at gcc dot gnu.org
  2020-08-20 23:13 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-20 23:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:a5d07caca15958980ae9cc4570a784f8b1a43403

commit r10-8647-ga5d07caca15958980ae9cc4570a784f8b1a43403
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Jul 21 19:59:00 2020 +0200

    d: Fix ICE using non-local variable: internal compiler error: Segmentation
fault

    Moves no frame access error to own function, adding use of it for both
    when get_framedecl() cannot find a path to the outer function frame, and
    guarding get_decl_tree() from recursively calling itself.

    gcc/d/ChangeLog:

            PR d/96254
            * d-codegen.cc (error_no_frame_access): New.
            (get_frame_for_symbol): Use fdparent name in error message.
            (get_framedecl): Replace call to assert with error.
            * d-tree.h (error_no_frame_access): Declare.
            * decl.cc (get_decl_tree): Detect recursion and error.

    gcc/testsuite/ChangeLog:

            PR d/96254
            * gdc.dg/pr96254a.d: New test.
            * gdc.dg/pr96254b.d: New test.

    (cherry picked from commit 2b1c2a4bd9fb555dccde5d67d6da64547064e0e6)

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

* [Bug d/96254] d: ICE using non-local variable: internal compiler error: Segmentation fault
  2020-07-20 22:40 [Bug d/96254] New: d: ICE using non-local variable: internal compiler error: Segmentation fault ibuclaw at gdcproject dot org
  2020-08-03 10:00 ` [Bug d/96254] " cvs-commit at gcc dot gnu.org
  2020-08-20 23:10 ` cvs-commit at gcc dot gnu.org
@ 2020-08-20 23:13 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-08-20 23:13 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

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

--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Done.

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

end of thread, other threads:[~2020-08-20 23:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 22:40 [Bug d/96254] New: d: ICE using non-local variable: internal compiler error: Segmentation fault ibuclaw at gdcproject dot org
2020-08-03 10:00 ` [Bug d/96254] " cvs-commit at gcc dot gnu.org
2020-08-20 23:10 ` cvs-commit at gcc dot gnu.org
2020-08-20 23:13 ` 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).