This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/84100] New: Function __attribute__((optimize(align-loops=32))) gives spurious warning


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

            Bug ID: 84100
           Summary: Function __attribute__((optimize(align-loops=32)))
                    gives spurious warning
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at gmch dot uk
  Target Milestone: ---

With v7.2.1, compiling for recent x86_64, the command line option
"-falign-loops=32" is accepted and has the desired effect.

However I find that both:

    _Pragma("GCC optimize(\"align-loops=32\")")

and:

    __attribute__((optimize("align-loops=32")))

are rejected with a "warning: bad option '-falign-loops=32'" -- reported for
each and every affected function.

I have tried optimize("align-loops=x") for x=0, 1, 8 and 16 -- all are rejected
the same way.

FWIW, brief checks with Compiler Explorer suggest:

  1) this appears to be a new bug in v7, or at least
     since v6.3.

  2) v6.3 accepts the _Pragma(), but does *not* do the requested
     alignment.

  3) v5.4 accepts the _Pragma(), and does the requested alignment.

Chris

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]