Seeking advice on creating reduced testcase

Manuel López-Ibáñez lopezibanez@gmail.com
Fri Sep 25 08:33:00 GMT 2015


On 25/09/15 07:53, Alexander Monakov wrote:
> On Thu, 24 Sep 2015, Johan Alfredsson wrote:
>> I'm seeing this already@-O1 (-O0 is fine, no deadlock). Now, I
>> tried to bisect whatever options -O1 implies by looking@what g++ -Q
>> -O1... produced, but it turns out that when I use the full list of
>> options (except for -fleading-underscore and -fgnu-runtime, which
>> obviously are not actually used for my -O1 compile, as either the
>> compiler complains that I'm not using LTO or the linker complains
>> about ___dso_handle being undefined for libstdc++ code) I don't get
>> the deadlock anymore.
>
> As GCC manual mentions, without -O optimizations are disabled, even if
> individual flags are passed on the command line (how did you find out about
> -Q, and yet not about that restriction?).  Thus, you have to keep -O1 and add
> -fno-...  flags to disable optimizations, if you want to bisect on that basis.
>
> (the manual also mentions that not all optimizations have a flag, so even if
> the above restriction wasn't there, such bisection would still have to work by
> removing optimization from a failing level)

Or simply: https://gcc.gnu.org/wiki/FAQ#optimization-options

Cheers,

Manuel.



More information about the Gcc-help mailing list