This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Seeking advice on creating reduced testcase
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Johan Alfredsson <sduvan dot gcc at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Fri, 25 Sep 2015 08:53:37 +0300 (MSK)
- Subject: Re: Seeking advice on creating reduced testcase
- Authentication-results: sourceware.org; auth=none
- References: <CA+pZiO7Nims-3Vta_R4=eyaa+cFfXtiQ8tYVaH24njJPU_B-Rg at mail dot gmail dot com>
On Thu, 24 Sep 2015, Johan Alfredsson wrote:
> I'm seeing this already at -O1 (-O0 is fine, no deadlock). Now, I
> tried to bisect whatever options -O1 implies by looking at 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)
Alexander