public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/57482] New: --help=optimizers reports a wrong list
@ 2013-05-31  9:28 christophe.beausoleil at sogeti dot com
  2013-06-04 13:38 ` [Bug other/57482] [4.7.3][AVR] " gjl at gcc dot gnu.org
  2013-06-10  8:04 ` christophe.beausoleil at sogeti dot com
  0 siblings, 2 replies; 3+ messages in thread
From: christophe.beausoleil at sogeti dot com @ 2013-05-31  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57482
           Summary: --help=optimizers reports a wrong list
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christophe.beausoleil at sogeti dot com

Hello,

I am using GCC 4.7.3 built for AVR targets on a Linux machine. The command :
avr-gcc -mmcu=atmega128 -O1 -Q --help=optimizers
returns a list of enabled options for the -O1 optimization level.

Among these enabled options is :
 -fshort-enums                         [enabled]

However, I can see that this option is not enabled by -O1. I simply did :
typedef enum {val1, val2} Tenum;
Tenum Venum;

I compile with :
avr-gcc -mmcu=atmega128 -O1 test.c -o test.elf

and check Venum size with :
avr-nm -S test.elf | grep Venum

which gives :
00800109 00000002 B Venum

I have to explicitly use -fshort-enums in my command line in order that GCC
takes it into account :
00800109 00000001 B Venum

I must also add that the problem is the same for -00 and -02.

The question is : how can I know which options are effectively enabled or not ?
Can I easily find the answer in source code ?

Thanks a lot for reading till here and for any support !

Best regards

Christophe


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

end of thread, other threads:[~2013-06-10  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31  9:28 [Bug c/57482] New: --help=optimizers reports a wrong list christophe.beausoleil at sogeti dot com
2013-06-04 13:38 ` [Bug other/57482] [4.7.3][AVR] " gjl at gcc dot gnu.org
2013-06-10  8:04 ` christophe.beausoleil at sogeti dot com

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).