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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> -msve-vector-bits is not specially handled in lto-wrapper and thus it will
> go the "default" and ferry that over to the link command.
> 
> The flag should get into the function-specific target attribute but global
> vars can be affected which is likely the issue here.

  /* The following does what the old LTO option code did,
     union all target and a selected set of common options.  */
  for (i = 0; i < fdecoded_options.length (); ++i)
    {
...
        default:
          if (!(cl_options[foption->opt_index].flags & CL_TARGET))
            break;
...
          /* Do what the old LTO code did - collect exactly one option
             setting per OPT code, we pick the first we encounter.
             ???  This doesn't make too much sense, but when it doesn't
             then we should complain.  */
          if (existing_opt == -1)
            decoded_options.safe_push (*foption);
          break;        

that also means if you have "conflicting" -msve-vector-bits=... the first
one wins.

Reply via email to