This is the mail archive of the gcc-help@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]

Re: -O2 and volatile


Hi Marcus,

Can you post a small, complete code example that exhibits the broken behavior you mentioned?

Which version of GCC?  On what platform?

Have you looked at the assembly output (.s file extension), using the "-save-temps" flag, to see which variables GCC took the liberty to eliminate?

In my experience, sometimes the errant behavior (presuming its GCC and not the code ... which it sometimes has been a flaw in GCC) can be corrected by using the appropriate "-fno-fubaroptimization".

Thanks,
--Eljay



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