public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48110] New: __attribute__ ((optimize(...))) version of -Ofast
@ 2011-03-14 10:30 vincenzo.innocente at cern dot ch
  2013-11-08 10:34 ` [Bug middle-end/48110] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-03-14 10:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48110

           Summary: __attribute__ ((optimize(...))) version of -Ofast
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincenzo.innocente@cern.ch


gcc 4.6 introduces a new global optimization switch -Ofast.
Independently of what actually it is composed of, it seems not supported by 
__attribute__ ((optimize(...))) 

for instance
__attribute__ ((optimize("fast-math"))) works
 __attribute__ ((optimize("3"))) works

while
 __attribute__ ((optimize("fast")))
produces 
 error: unrecognized command line option '-ffast'


is this a bug or shall I use a different syntax?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/48110] __attribute__ ((optimize(...))) version of -Ofast
  2011-03-14 10:30 [Bug middle-end/48110] New: __attribute__ ((optimize(...))) version of -Ofast vincenzo.innocente at cern dot ch
@ 2013-11-08 10:34 ` rguenth at gcc dot gnu.org
  2021-09-02  5:15 ` [Bug middle-end/48110] "fast" and "g" should be aliases of "Ofast" and "Og" inside optimize attribute pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-08 10:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48110

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Indeed, not sure why we even support "3" or "s", but "fast" would certainly
alias with -fast ;)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/48110] "fast" and "g" should be aliases of "Ofast" and "Og" inside optimize attribute
  2011-03-14 10:30 [Bug middle-end/48110] New: __attribute__ ((optimize(...))) version of -Ofast vincenzo.innocente at cern dot ch
  2013-11-08 10:34 ` [Bug middle-end/48110] " rguenth at gcc dot gnu.org
@ 2021-09-02  5:15 ` pinskia at gcc dot gnu.org
  2021-09-02  5:20 ` [Bug c/48110] " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-02  5:15 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |rejects-valid
   Last reconfirmed|                            |2021-09-02
            Summary|__attribute__               |"fast" and "g" should be
                   |((optimize(...))) version   |aliases of "Ofast" and "Og"
                   |of -Ofast                   |inside optimize attribute
     Ever confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. "g" has the same issue too.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/48110] "fast" and "g" should be aliases of "Ofast" and "Og" inside optimize attribute
  2011-03-14 10:30 [Bug middle-end/48110] New: __attribute__ ((optimize(...))) version of -Ofast vincenzo.innocente at cern dot ch
  2013-11-08 10:34 ` [Bug middle-end/48110] " rguenth at gcc dot gnu.org
  2021-09-02  5:15 ` [Bug middle-end/48110] "fast" and "g" should be aliases of "Ofast" and "Og" inside optimize attribute pinskia at gcc dot gnu.org
@ 2021-09-02  5:20 ` pinskia at gcc dot gnu.org
  2021-12-23  4:11 ` pinskia at gcc dot gnu.org
  2021-12-23 13:20 ` egallager at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-02  5:20 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |c

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The code is in c-family/c-common:
                  /* Assume that Ox is -Ox, a numeric value is -Ox, a s by
                     itself is -Os, and any other switch begins with a -f.  */
                  if ((*p >= '0' && *p <= '9')
                      || (p[0] == 's' && p[1] == '\0'))
                    *r++ = 'O';
                  else if (*p != 'O')
                    *r++ = 'f';


as you can see 's' is support by that but 'g' or "fast" is not.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/48110] "fast" and "g" should be aliases of "Ofast" and "Og" inside optimize attribute
  2011-03-14 10:30 [Bug middle-end/48110] New: __attribute__ ((optimize(...))) version of -Ofast vincenzo.innocente at cern dot ch
                   ` (2 preceding siblings ...)
  2021-09-02  5:20 ` [Bug c/48110] " pinskia at gcc dot gnu.org
@ 2021-12-23  4:11 ` pinskia at gcc dot gnu.org
  2021-12-23 13:20 ` egallager at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-23  4:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48110
Bug 48110 depends on bug 53776, which changed state.

Bug 53776 Summary: pragma optimize does not support Os
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53776

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/48110] "fast" and "g" should be aliases of "Ofast" and "Og" inside optimize attribute
  2011-03-14 10:30 [Bug middle-end/48110] New: __attribute__ ((optimize(...))) version of -Ofast vincenzo.innocente at cern dot ch
                   ` (3 preceding siblings ...)
  2021-12-23  4:11 ` pinskia at gcc dot gnu.org
@ 2021-12-23 13:20 ` egallager at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-12-23 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org,
                   |                            |roger at nextmovesoftware dot com

--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
Hm, I wonder if this affects the new -Oz switch, too...

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-23 13:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 10:30 [Bug middle-end/48110] New: __attribute__ ((optimize(...))) version of -Ofast vincenzo.innocente at cern dot ch
2013-11-08 10:34 ` [Bug middle-end/48110] " rguenth at gcc dot gnu.org
2021-09-02  5:15 ` [Bug middle-end/48110] "fast" and "g" should be aliases of "Ofast" and "Og" inside optimize attribute pinskia at gcc dot gnu.org
2021-09-02  5:20 ` [Bug c/48110] " pinskia at gcc dot gnu.org
2021-12-23  4:11 ` pinskia at gcc dot gnu.org
2021-12-23 13:20 ` egallager at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).