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]

gcc 4.1 -O1 problem


Hi,

I've come across a problem with my program when compiling with gcc-4.1
as opposed to gcc-4.0. With 4.1, the sound output comes out as
corrupted. I've narrowed it down to a single source file, and the fact
that it works with -O0 but not -O1.

However, I've tried to find the specific optimisation flag that is
causing the issue and I've come up against the situation below:

If I compile with -O0 and each of the flags below, the sound output is
working again. If I compile with -O1 and each of the options below
changed to -fno-... then the sound corruption is back:

          -fdefer-pop 
          -fdelayed-branch 
          -fguess-branch-probability 
          -fcprop-registers 
          -floop-optimize 
          -fif-conversion 
          -fif-conversion2 
          -ftree-ccp 
          -ftree-dce 
          -ftree-dominator-opts 
          -ftree-dse 
          -ftree-ter 
          -ftree-lrs 
          -ftree-sra 
          -ftree-copyrename 
          -ftree-fre 
          -ftree-ch 
          -fmerge-constants

Are there any other options besides these which -O1 affects?
Any other ideas as to how I can narrow down the cause?

Thanks,
Kevin.


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