http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46029
Summary: -ftree-loop-if-convert-stores causes FAIL:
libstdc++-v3/testsuite/ext/pb_ds/example/tree_interval
s.cc
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 22047
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22047
preprocessed source
Output:
$ g++ -O -fstrict-aliasing -ftree-loop-if-convert-stores -std=c++0x
tree_intervalsn64.C
$ valgrind ./a.out
==26534== Invalid read of size 4
==26534== at 0x40550D: void
some_op_sequence<__gnu_pbds::tree<std::pair<unsigned int, unsigned int>,
__gnu_pbds::null_mapped_type, std::less<std::pair<unsigned int, unsigned int>
>, __gnu_pbds::rb_tree_tag, intervals_node_update, std::allocator<char> >
>(__gnu_pbds::tree<std::pair<unsigned int, unsigned int>,
__gnu_pbds::null_mapped_type, std::less<std::pair<unsigned int, unsigned int>
>, __gnu_pbds::rb_tree_tag, intervals_node_update, std::allocator<char> >) (in
/home/smatz/gcc-bug/434/a.out)
==26534== by 0x400A70: main (in /home/smatz/gcc-bug/434/a.out)
==26534== Address 0x24 is not stack'd, malloc'd or (recently) free'd
==26534==
==26534==
==26534== Process terminating with default action of signal 11 (SIGSEGV)
==26534== Access not within mapped region at address 0x24
==26534== at 0x40550D: void
some_op_sequence<__gnu_pbds::tree<std::pair<unsigned int, unsigned int>,
__gnu_pbds::null_mapped_type, std::less<std::pair<unsigned int, unsigned int>
>, __gnu_pbds::rb_tree_tag, intervals_node_update, std::allocator<char> >
>(__gnu_pbds::tree<std::pair<unsigned int, unsigned int>,
__gnu_pbds::null_mapped_type, std::less<std::pair<unsigned int, unsigned int>
>, __gnu_pbds::rb_tree_tag, intervals_node_update, std::allocator<char> >) (in
/home/smatz/gcc-bug/434/a.out)
==26534== by 0x400A70: main (in /home/smatz/gcc-bug/434/a.out)
Tested revisions:
r165354 - fail
r163636 - fail
r161659 - doen't know -ftree-loop-if-convert-stores