Bug ID: 78636
           Summary: PPC Optimization Bug in Libelemental unit test
           Product: gcc
           Version: 6.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: me at ryanlewis dot net
  Target Milestone: ---

Created attachment 40218
example of failing code (which isn't failing)

I am working on packaging libelemental for Fedora. I have found that a few of
our unit tests fail on PPC with in Release mode and pass in Debug mode, only on
this architecture. I suspect this to be a compiler bug, as the code is quite

Here is the associated build log demonstrating how the software located here:

was compiled and ran:

here are other examples of it failing (it looks like a timeout issue here):

Here is an example of a failure in the debugger:

Program received signal SIGSEGV, Segmentation fault.
__memcpy_power7 () at ../sysdeps/powerpc/powerpc64/power7/memcpy.S:387
387             stvx    6,0,dst
Missing separate debuginfos, use: dnf debuginfo-install
(gdb) bt
#0  __memcpy_power7 () at ../sysdeps/powerpc/powerpc64/power7/memcpy.S:387
#1  0x00003fffb59da5f4 in std::char_traits<char>::copy
(__n=13839561654909534208, __s2=<optimized out>, __s1=<optimized out>)
#2  std::basic_streambuf<char, std::char_traits<char> >::xsputn
(this=0x3fffffffe568, __s=<optimized out>, __n=11)
#3  0x00003fffb59c5cd4 in std::basic_streambuf<char, std::char_traits<char>
>::sputn (__n=11, __s=0x2000e0a8 "  runtime: ", this=<optimized out>)
#4  std::__ostream_write<char, std::char_traits<char> > (__n=11, __s=0x2000e0a8
"  runtime: ", __out=...)
#5  std::__ostream_insert<char, std::char_traits<char> > (__out=...,
__s=0x2000e0a8 "  runtime: ", __n=11)
#6  0x000000002000402c in std::operator<< <std::char_traits<char> >
(__s=0x2000e0a8 "  runtime: ", __out=...) at /usr/include/c++/6.2.1/ostream:561
#7  El::BuildStream<char [12], double, char [9]> (item=..., os=...) at
#8  El::Output<char [12], double, char [9]> () at
#9  main (argc=<optimized out>, argv=<optimized out>) at

I isolated this bit of code to produce an elemental free minimal test case,
but, it appears that it does not fail when freed from this example.

I ran the code through valgrind I have attached the output, and I also removed
the function El::Output() (in favor of std::cout) and the failure disappears. I
then reran valgrind again. I will attach the valgrind output for both runs.

Reply via email to