[Bug pch/32636] New: [4.3 regression] 25_algorithms/search_n/iterator.cc: pch-related verify_ssa failure

hp at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jul 5 16:05:00 GMT 2007

My autotester flags the following failure as introduced between revisions
126197 and 126206 (people with gcc/ChangeLog entries in this range are CCed; no
suspect cp or libstdc++-v3 changes):
FAIL: 25_algorithms/search_n/iterator.cc (test for excess errors)

with this in libstdc++.log:
In function '_ForwardIterator std::__search_n(_ForwardIterator,
_ForwardIterator, _Integer, const _Tp&, std::forward_iterator_tag) [with
_ForwardIterator = __gnu_test::forward_iterator_wrapper<int>, _Integer = int,
_Tp = int]':^M
error: definition in block 22 does not dominate use in block 25^M
for SSA_NAME: __i$D47460$SharedInfo_40 in statement:^M
if (__i$D47460$SharedInfo_40 != D.52134_317)^M
internal compiler error: verify_ssa failed^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
See <URL:http://gcc.gnu.org/bugs.html> for instructions.^M

The target and host combination is significant; I haven't been able to
reproduce this on a x86 system, neither with x86_64-unknown-linux-gnu native.
At first sight the bug is generic, but apparently hidden for other

A iterator.ii is (to be) attached, but is likely not as helpful as it's
supposed to be, not more than avoiding the "make check" part, as it does not
contain the complete context for debugging cc1plus. It instead contains
#pragma GCC pch_preprocess
and when configuring with --disable-libstdcxx-pch, the bug is not exposed.

With a complete built tree and edited file path on the pch_preprocess line,
"cc1plus -melf -fpreprocessed /tmp/iterator.ii -g -O2 -o iterator.s" is
sufficient to reproduce the bug. (Actually the -g seems optional which it
shouldn't be, but I think that's a separate bug.)

Due to the PCH-ness and lack of debug context in iterator.ii, the steps to
reproduce are a bit involved, but trivial and the usual ones for a variant of
1. Check out, build and install targetted binutils somewhere:
/path/to/src/configure --target=cris-elf --prefix=/where/ever && make all &&
make install
2. Check out and combine newlib and gcc, for example as per
gcc.gnu.org/simtest-howto.html, and make sure gmp and mpfr are accessible
(in-tree or installed on the host)
3. Include /where/ever/bin in your PATH
4, Do /path/to/gccandnewlib/configure --target=cris-elf --prefix=/where/ever
5. Build; "make all"
6. You now have sufficient PCH context; edit the attached iterator.ii adjusting
the file path to the just-built O2g.gch and run the cc1plus line as above.

           Summary: [4.3 regression] 25_algorithms/search_n/iterator.cc:
                    pch-related verify_ssa failure
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-checking
          Severity: normal
          Priority: P3
         Component: pch
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: cris-elf


More information about the Gcc-bugs mailing list