Bug ID: 77968
           Summary: [7 Regression] ICEs with -flto on gnat.dg
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot
          Reporter: rguenth at gcc dot
                CC: ebotcazou at gcc dot
  Target Milestone: ---

When running check-gnat with -flto you'll stumble upon a load of

+===========================GNAT BUG DETECTED==============================+
| 7.0.0 20161013 (experimental) [trunk revision 221942] (x86_64-pc-linux-gnu)
GCC error:|
| in self_referential_size, at stor-layout.c:187                           |

which is

          /* We shouldn't have true variables here.  */
          gcc_assert (TREE_READONLY (ref));

that's likely because of

2016-07-11  Eric Botcazou  <>

        * gcc-interface/trans.c (add_decl_expr): Minor tweak.
        * gcc-interface/utils.c (create_var_decl): For an external variable,
        also clear TREE_READONLY in LTO mode if the initializer is not a valid
        constant and set DECL_READONLY_ONCE_ELAB instead.

possibly all flag_generate_lto uses in ada/gcc-frontend are "bogus".

Reply via email to