[Bug debug/80321] New: [7 regression] infinite recursion with inlining of nested function and debug info

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 5 09:35:00 GMT 2017


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

            Bug ID: 80321
           Summary: [7 regression] infinite recursion with inlining of
                    nested function and debug info
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: major
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ebotcazou at gcc dot gnu.org
            Blocks: 79255
  Target Milestone: ---

Created attachment 41132
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41132&action=edit
Self-contained testcase

This is a very annoying regression for Ada introduced by:

2017-03-31  Jakub Jelinek  <jakub@redhat.com>

        PR debug/79255
        * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
        a FUNCTION_DECL, pass it as decl instead of origin to
        process_scope_var.

in the form of an infinite recursion at -O2 -g between process_scope_var and
decls_for_scope in dwarf2out.c.

To reproduce:

eric@polaris:~/build/gcc/native> gnatchop debug10.txt 
splitting debug10.txt into:
   debug10.adb
   debug10_pkg.ads
eric@polaris:~/build/gcc/native> gcc/gnat1 -quiet debug10.adb -O2 -g

raised STORAGE_ERROR : stack overflow or erroneous memory access

The testcase can be added to the gnat.dg testsuite as-is.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79255
[Bug 79255] [6 Regression] PGO bootstrap fails on x86_64/ppc64le building Ada


More information about the Gcc-bugs mailing list