[Bug libstdc++/56538] no way to disable shared_ptr's use of atomics

2021-08-15 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56538

Jan Kratochvil  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #4 from Jan Kratochvil  ---
With gcc-11.2.1-1.fc34.x86_64 and i7-8650U there isn't any performance
difference of the reproducer. I can check why it is so when I have more time in
the future.

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-12 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #17 from Jan Kratochvil  ---
Yes, the testcase TestTypeCompletion.py category 'dwo' is now fixed with the
patch from Comment 15.

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-10 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #14 from Jan Kratochvil  ---
DW_AT_addr_base is for .debug_addr in the main file, I agree, my mistake. That
should be inherited from the skeleton to the split-unit.

But DW_AT_loclists_base, DW_AT_rnglists_base and DW_AT_str_offsets_base point
to .debug_loclists.dwo, .debug_rnglists.dwo and .debug_str_offsets.dwo
respectively.
As there is only one CU in a DWO they make no sense to be inherited from the
skeleton unit to split-unit.

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-10 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #12 from Jan Kratochvil  ---
That looks as a DWARF5 bug to me. DW_AT_str_offsets_base, DW_AT_addr_base and
DW_AT_rnglists_base do not make any sense for a split unit. Split unit contains
only one CompileUnit (and optionally one TypeUnit where only
DW_AT_str_offsets_base would have some sense).

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-10 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #10 from Jan Kratochvil  ---
clang is using DW_AT_ranges+DW_FORM_rnglistx+DW_AT_rnglists_base in the main
file but in the DWO file it assumes DW_AT_rnglists_base is right after the
.debug_rnglists header (as it does not make sense to point it anywhere else in
a DWO file having single CU). It makes sense although I do not see it specified
in DWARF-5:

.debug_info contents:
...
0x0014: DW_TAG_skeleton_unit [1]  
...
  DW_AT_ranges [DW_FORM_rnglistx]   (indexed (0x0) rangelist =
0x0010
 [0x00401110, 0x0040)
 [0x00401120, 0x00401121)
 [0x00401130, 0x00401171))
...
  DW_AT_rnglists_base [DW_FORM_sec_offset]  (0x000c)

.debug_info.dwo contents:
...
0x0014: DW_TAG_compile_unit [1] *
...
  DW_AT_ranges [DW_FORM_rnglistx]   (indexed (0x0)
rangelist = 0x0010
 [0x0004, 0x0016)
 [0x0022, 0x0034))

https://github.com/llvm/llvm-project/blob/523d7bc6f427f9ae32e54dbf1764826cfb269d21/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp#L388

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-10 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #7 from Jan Kratochvil  ---
It would be nice if you could provide the .s/.o/.dwo files so that one does not
have to rebuild the patched GCC.

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-09 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #3 from Jan Kratochvil  ---
LLDB testsuite failure from it is:

PASS: LLDB (/usr/bin/gcc-x86_64) :: test_with_run_command_dwarf
(TestTypeCompletion.TypeCompletionTestCase)
error: a.out {0x5850}: DIE has DW_AT_ranges(0x0) attribute, but range
extraction failed (missing or invalid range list table), please file a bug and
attach the file at the start of this error message
FAIL: LLDB (/usr/bin/gcc-x86_64) :: test_with_run_command_dwo
(TestTypeCompletion.TypeCompletionTestCase)
Failed Tests (1):
  lldb-api :: functionalities/type_completion/TestTypeCompletion.py

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-09 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #2 from Jan Kratochvil  ---
Created attachment 50341
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50341=edit
range-gcc.s

[Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-09 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

--- Comment #1 from Jan Kratochvil  ---
Created attachment 50340
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50340=edit
range-clang.s

[Bug debug/99490] New: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file

2021-03-09 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490

Bug ID: 99490
   Summary: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main
file, not .dwo file
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jan.kratochvil at redhat dot com
  Target Milestone: ---

FAIL: gcc-11.0.0-0.19.fc35.x86_64
PASS: clang-12.0.0-0.1.rc1.fc35.x86_64

double p_ext=3.14,e_ext=2.71;
int main(void) {
  double q,f;
  { volatile double p=p_ext;
q=p/1.1;
  }
  { volatile double e=e_ext;
f=e/1.1;
  }
  return q+f;
}

clang -o range-clang range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;gcc -o
range-gcc.s range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf
llvm-readelf -WS range-{clang,gcc}{,.dwo} | egrep '^File:|debug_rnglists'
File: range-clang
File: range-clang.dwo
  [ 6] .debug_rnglists.dwo PROGBITS   0001d4 17 00   E 
0   0  1
Actual:
File: range-gcc
  [33] .debug_rnglists   PROGBITS 004c0a 49 00 
0   0  1
File: range-gcc.dwo
Expected:
File: range-gcc
File: range-gcc.dwo
  [33] .debug_rnglists   PROGBITS 004c0a 49 00 
0   0  1

DWARF-5 spec:
"The .debug_rnglists.dwosection contains range lists referenced by any
DW_AT_ranges attributes in the split DWARF object."
"Range lists are contained in a separate object file section called
.debug_rnglists or .debug_rnglists.dwo (in split units)."

Reproducer from attached .s files:
: clang -S -o range-clang.s range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;clang -o
range-clang range-clang.s -Wall -gdwarf-5 -gsplit-dwarf;: gcc -S -o range-gcc.s
range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;gcc -o range-gcc range-gcc.s -Wall
-gdwarf-5 -gsplit-dwarf

[Bug c++/92598] explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace

2021-02-16 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598

--- Comment #3 from Jan Kratochvil  ---
LLVM has workarounded it by:
https://reviews.llvm.org/rG0e3d7e61867d69721b28e557272bdf4b66010327
template <>
- struct DenseMapInfo> {
+ struct llvm::DenseMapInfo> {

[Bug c++/92598] explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace

2021-02-16 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598

--- Comment #2 from Jan Kratochvil  ---
Created attachment 50210
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50210=edit
2j.cpp.xz

gcc-11.0.0-0.19.fc34.x86_64
g++ -c 2j.cpp
/home/jkratoch/redhat/llvm-monorepo/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:86:8:
error: explicit specialization of 'template struct llvm::DenseMapInfo'
outside its namespace must use a nested-name-specifier [-fpermissive]
   86 | struct DenseMapInfo> {
  |   
^~~

[Bug c++/92598] explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace

2021-02-16 Thread jan.kratochvil at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598

Jan Kratochvil  changed:

   What|Removed |Added

 CC||jan.kratochvil at redhat dot 
com

--- Comment #1 from Jan Kratochvil  ---
Created attachment 50209
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50209=edit
1j.cpp.xz

gcc-10.2.1-9.fc33.x86_64
g++ -c 1j.cpp 
/home/jkratoch/redhat/llvm-monorepo/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:86:8:
error: explicit specialization of ‘template struct llvm::DenseMapInfo’
outside its namespace must use a nested-name-specifier [-fpermissive]
   86 | struct DenseMapInfo> {
  |   
^~~