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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jakub at redhat dot com
   Last reconfirmed|                            |2026-02-06

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Note that this is not directly a modref bug, modref is just last pass that ran
before streaming.

It fails at
      /* Flags that should not appear on indirect calls.  */
      gcc_assert (!(flags & (ECF_LOOPING_CONST_OR_PURE
                             | ECF_MAY_BE_ALLOCA
                             | ECF_SIBCALL
                             | ECF_LEAF
                             | ECF_NOVOPS)));

 Jakub,
I think with reproducible flag we can now get those flags on indirect calls
int (*fp1) (int) [[gnu::reproducible]] = f6;
so this sanity check can just be dropped and we can stream them instead?

With devirtualization machinery we also should be able to infer those flags
when all indirect call targets are known to have a given flag.  pure-const nor
modref are doing this, but I was planing to implement it for a while, so in
future I guess we can get all kinds of flags in indirect calls this way.

Reply via email to