[Bug libstdc++/88859] [8/9 Regression] FAIL: experimental/string_view/operators/wchar_t/2.cc execution test

2019-01-16 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88859

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=24097
 Resolution|--- |MOVED

--- Comment #7 from H.J. Lu  ---
This is a glibc bug:

https://sourceware.org/bugzilla/show_bug.cgi?id=24097

[Bug libstdc++/88859] [8/9 Regression] FAIL: experimental/string_view/operators/wchar_t/2.cc execution test

2019-01-15 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88859

--- Comment #6 from H.J. Lu  ---
__y is passed in %rsi:

(gdb) p &__y
Address requested for identifier "__y" which is in register $rsi
(gdb) p __y
$24 = {static npos = , _M_len = 10, 
  _M_str = 0x402008 L"costa rica"}
(gdb) p/x $rsi
$25 = 0x402008000a
(gdb) 

   0x00401690 <+32>:mov%rdi,%rdx
   ^^^ This should be "mov %edi, %edx".
   0x00401693 <+35>:shr$0x20,%rsi
   0x00401697 <+39>:shr$0x20,%rdi
   0x0040169b <+43>:callq  0x401050 

[Bug libstdc++/88859] [8/9 Regression] FAIL: experimental/string_view/operators/wchar_t/2.cc execution test

2019-01-15 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88859

--- Comment #5 from H.J. Lu  ---
Breakpoint 1, std::char_traits::compare (__n=, 
__s2=, __s1=)
at
/export/build/gnu/tools-build/gcc-x32-debug-8/build-x86_64-linux/x86_64-pc-linux-gnu/x32/libstdc++-v3/include/bits/char_traits.h:420
420   return wmemcmp(__s1, __s2, __n);
(gdb) c
Continuing.

Breakpoint 2, __wmemcmp_avx2_movbe ()
at ../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:61
61  shl $2, %rdx
$7 = 18049617241309194
(gdb) p/x $rdx
$8 = 0x402008000a
(gdb) 


18049617241309194 is a bogus length.

[Bug libstdc++/88859] [8/9 Regression] FAIL: experimental/string_view/operators/wchar_t/2.cc execution test

2019-01-15 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88859

--- Comment #4 from H.J. Lu  ---
[hjl@gnu-skx-1 pr88859]$ cat x.cc 
#include 

#define VERIFY(fn) if (!(fn)) __builtin_abort();

int
main() 
{
  std::experimental::wstring_view   str_0(L"costa rica");
  std::experimental::wstring_view   str_1(L"costa marbella");
  std::experimental::wstring_view   str_2(L"cost");
  std::experimental::wstring_view   str_3(L"costa ricans");
  std::experimental::wstring_view  str_4;

  str_4 = str_0;
  VERIFY( !(str_0 == str_1) );
  VERIFY( !(str_0 == str_2) );
  VERIFY( !(str_0 == str_3) );
  VERIFY( !(str_1 == str_0) );
  VERIFY( !(str_2 == str_0) );
  VERIFY( !(str_3 == str_0) );
  VERIFY( str_4 == str_0 );
  VERIFY( str_0 == str_4 );

  VERIFY( !(str_0 == L"costa marbella") );
  VERIFY( !(str_0 == L"cost") );
  VERIFY( !(str_0 == L"costa ricans") );
  VERIFY( !(L"cost" == str_0) );
  VERIFY( !(L"costa ricans" == str_0) );
  VERIFY( L"costa rica" == str_0 );
  VERIFY( str_0 == L"costa rica" );

  VERIFY( L"costa ricans" != str_0 );
  VERIFY( !(L"costa rica" != str_0) );

  return 0;
}
[hjl@gnu-skx-1 pr88859]$ make
g++ -O2 -mx32 -S x.cc
g++ -O2 -mx32 -o x x.s
./x
make: *** [Makefile:12: all] Segmentation fault
[hjl@gnu-skx-1 pr88859]$

[Bug libstdc++/88859] [8/9 Regression] FAIL: experimental/string_view/operators/wchar_t/2.cc execution test

2019-01-15 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88859

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-01-15
Summary|FAIL:   |[8/9 Regression] FAIL:
   |experimental/string_view/op |experimental/string_view/op
   |erators/wchar_t/2.cc|erators/wchar_t/2.cc
   |execution test  |execution test
 Ever confirmed|0   |1

--- Comment #3 from H.J. Lu  ---
This was triggered by r254832.  The bug may be latent before.