[Bug debug/119766] -gsplit-dwarf and -fdebug-types-section leads to multiple .debug_info.dwo sections

2025-04-24 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119766 Simon Marchi changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug debug/119766] -gsplit-dwarf and -fdebug-types-section leads to multiple .debug_info.dwo sections

2025-04-13 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119766 --- Comment #3 from Simon Marchi --- (In reply to Andrew Pinski from comment #1) > My reading of the documentation, that gcc is doing the correct thing here. > You requested that the types split into their own section and splitting it > out to a

[Bug debug/119766] New: -gsplit-dwarf and -fdebug-types-section leads to multiple .debug_info.dwo sections

2025-04-12 Thread simon.marchi at polymtl dot ca via Gcc-bugs
Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- Using the test file: --- #include int main() { std::vector foo; foo.push_back(3); return foo[0

[Bug libstdc++/117372] New: std::list pretty printer: AttributeError: 'NoneType' object has no attribute 'pointer'

2024-10-30 Thread simon.marchi at polymtl dot ca via Gcc-bugs
Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- I got this while debugging gdb with gdb. I have not been able to make a small re

[Bug tree-optimization/111073] [13/14/15 regression] False-positive -Wstringop-overflow when building gdb from trunk with -D_GLIBCXX_ASSERTIONS

2024-08-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111073 --- Comment #5 from Simon Marchi --- Created attachment 58840 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58840&action=edit creduced example To build the creduced example: $ g++ -x c++ -Wall -Werror -g3 -O2 -c creduced.cpp Note that

[Bug tree-optimization/111073] [13/14/15 regression] False-positive -Wstringop-overflow when building gdb from trunk with -D_GLIBCXX_ASSERTIONS

2024-08-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111073 Simon Marchi changed: What|Removed |Added CC||simon.marchi at polymtl dot ca

[Bug c++/113599] New: Wrong computation of member offset through pointer-to-member

2024-01-25 Thread simon.marchi at polymtl dot ca via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- This commit: c++: non-dependent .* operand folding [PR112427] https://gitlab.com/gnutools/gcc/-/commit/d3f48f68227 seems to

[Bug c++/111374] New: Spurious -Warray-bounds warning when building std::vector (or libstdc++ bug?)

2023-09-11 Thread simon.marchi at polymtl dot ca via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- I encountered what seems to be either an invalid -Warray-bounds warning, or a bug in libstdc++. I see it when

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #8 from Simon Marchi --- I tested with just patching my /usr/include, and it looks like it works fine, I'm able to run a program under my GDB. Removing the fix, I get back the hang.

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #6 from Simon Marchi --- Because some code trying to acquire the lock (see frame #7 in my backtrace) is in debug.cc, I thought it would maybe need to be changed too? But I don't really understand any of this.

[Bug libstdc++/108288] Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-05 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108288 --- Comment #4 from Simon Marchi --- Thanks for looking into this so quickly. I'll try to test the patch against my use case, but I might need some guidance. I know how to build gcc and install it in some non-default prefix. But then, do I ne

[Bug libstdc++/108288] New: Deadlock when using -fno-elide-constructor + -D_GLIBCXX_DEBUG=1 + -std=c++11

2023-01-04 Thread simon.marchi at polymtl dot ca via Gcc-bugs
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- I built GDB with -fno-elide-constructor in order to chase / prove a bug in some move constructor (which would

[Bug debug/107414] dwarf 5 C macro support

2022-10-26 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107414 Simon Marchi changed: What|Removed |Added CC||simon.marchi at polymtl dot ca

[Bug c++/81159] New warning idea: -Wself-move

2022-08-26 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81159 --- Comment #11 from Simon Marchi --- Awesome, thanks!

[Bug debug/105088] Small DWARF 5 spec violation in line table when passing an absolute path

2022-03-28 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105088 --- Comment #1 from Simon Marchi --- Looking at the .s, I see that gcc attempts to pass "/tmp/cwd/test.c" as the name of the file at index 0: .file 0 "/home/simark" "/tmp/cwd/test.c" If gas did put "/tmp/cwd/test.c" as the name in the line t

[Bug debug/105088] New: Small DWARF 5 spec violation in line table when passing an absolute path

2022-03-28 Thread simon.marchi at polymtl dot ca via Gcc-bugs
: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- With: $ gcc --version gcc (GCC) 11.2.0 $ as --version GNU assembler (GNU Binutils) 2.38 I have a source file at /tmp

[Bug libstdc++/101659] _GLIBCXX_DEBUG mode for std::optional ?

2021-07-29 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101659 Simon Marchi changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/101659] New: _GLIBCXX_DEBUG mode for std::optional ?

2021-07-28 Thread simon.marchi at polymtl dot ca via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- There doesn't seem to be a version of std::optional with debug runtime checks enabled with _GLIBCXX_DEBUG. It seems to me like it would be useful, to catch "der

[Bug debug/101378] Negative DW_AT_data_member_location

2021-07-08 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101378 --- Comment #1 from Simon Marchi --- I bisected, it started with: libstdc++: Remove inheritance from elements in std::tuple 91e6226f880b048275a7ceedef716e159c7cefd9 So it's likely related to the use of [[no_unique_address]]. Relevant thread o

[Bug debug/101378] New: Negative DW_AT_data_member_location

2021-07-08 Thread simon.marchi at polymtl dot ca via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- I'm at 1ca642d785c49e9e0b28651b190720267703f023 (current master). $ cat test.cpp #include int main() { std::unique_ptr p(new int); return 0; } $ /opt/gcc/git/

[Bug debug/100610] New: DWARF5, wrong include_directories[0] when building in /

2021-05-15 Thread simon.marchi at polymtl dot ca via Gcc-bugs
Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- If I build a trivial test file while in the /tmp directory: $ pwd /tmp $ cat test.c #include #define FOO 2 int main

[Bug debug/100446] GDB has problems reading GCC's debugging info level -g3

2021-05-12 Thread simon.marchi at polymtl dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100446 Simon Marchi changed: What|Removed |Added CC||simon.marchi at polymtl dot ca

[Bug debug/96937] Duplicate DW_TAG_formal_parameter in out-of-line DW_TAG_subprogram instance

2020-09-08 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96937 --- Comment #5 from Simon Marchi --- (In reply to Richard Biener from comment #3) > Hmm, can you point out the issue in the reduced testcase? I can't see it. > The only cloning done I see is partial inlining so does > -fno-partial-inlining fix

[Bug debug/96937] Duplicate DW_TAG_formal_parameter in out-of-line DW_TAG_subprogram instance

2020-09-08 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96937 --- Comment #4 from Simon Marchi --- Created attachment 49198 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49198&action=edit Output from creduce

[Bug debug/96937] Duplicate DW_TAG_formal_parameter in out-of-line DW_TAG_subprogram instance

2020-09-04 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96937 --- Comment #2 from Simon Marchi --- Created attachment 49181 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49181&action=edit Output from creduce I compile the reproducer program with: /opt/gcc/git/bin/g++ -x c++ -g3 -O2 -c bug.c

[Bug debug/96937] Duplicate DW_TAG_formal_parameter in out-of-line DW_TAG_subprogram instance

2020-09-04 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96937 --- Comment #1 from Simon Marchi --- I passed the program in creduce, the result is not pretty but it's not too big and still reproduces the problem, so I'll attach it anyway.

[Bug debug/96937] New: Duplicate DW_TAG_formal_parameter in out-of-line DW_TAG_subprogram instance

2020-09-04 Thread simon.marchi at polymtl dot ca
: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- While debugging GDB (compiled with GCC master and -O2) with GDB, I get: 972 do_examine (struct format_data fmt

[Bug c/82206] -Wformat-nonliteral does not warn when passing a non literal to vprintf

2020-06-27 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82206 --- Comment #1 from Simon Marchi --- Stumbled on this again in the GDB code. Here's another reproducer, probably the same cause: --- #include #include void add_line (const std::string &str); void string_vappendf (std::string &str, const char

[Bug c/95157] Missing -Wtautological-compare warning

2020-05-16 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95157 --- Comment #2 from Simon Marchi --- Ah, good point! So yeah, please consider the test case without `volatile`.

[Bug c/95157] New: Missing -Wtautological-compare warning

2020-05-15 Thread simon.marchi at polymtl dot ca
Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- Using this code: volatile short insn; int main() { if (insn < 0 && insn > 3) { return 1; } else { return 0; } } clang 11 warns, but gcc does

[Bug c++/95156] New: -Wtautological-compare warns in C but not C++

2020-05-15 Thread simon.marchi at polymtl dot ca
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- Any reason why this code: volatile unsigned short insn; int main() { if ((insn & 0xffb0) == 0xe950) { return 1; } else { return 0; } } warns

[Bug analyzer/94378] -Wanalyzer-malloc-leak false positive when returning a struct by value holding a heap-allocated pointer

2020-04-02 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94378 --- Comment #7 from Simon Marchi --- (In reply to David Malcolm from comment #6) > Thanks Simon. The second diagnostic definitely looks like a false positive; > am not sure about the first. Please can you file a separate bug about this. I file

[Bug analyzer/94458] New: -Wanalyzer-malloc-leak false positive when returning a heap-allocated struct by value holding a heap-allocated pointer

2020-04-02 Thread simon.marchi at polymtl dot ca
Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- Variation of [1], where the returned struct is heap

[Bug analyzer/94378] -Wanalyzer-malloc-leak false positive when returning a struct by value holding a heap-allocated pointer

2020-04-01 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94378 --- Comment #5 from Simon Marchi --- Created attachment 48165 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48165&action=edit Analyzer report for argpar Here it is.

[Bug analyzer/94378] -Wanalyzer-malloc-leak false positive when returning a struct by value holding a heap-allocated pointer

2020-04-01 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94378 --- Comment #3 from Simon Marchi --- Thanks, I confirm that issue with the snippet I posted is fixed. It didn't fix the original issue that lead be to making this minimal reproducer, so I guess I'll have to go back and make another reproducer.

[Bug analyzer/94378] New: -Wanalyzer-malloc-leak false positive when returning a struct by value holding a heap-allocated pointer

2020-03-27 Thread simon.marchi at polymtl dot ca
: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- I tried the analyzer, and I believe it outputs a false positive on this snippet

[Bug driver/87161] if -Werror appear after -Wmissing-prototypes the warning is not turn into error

2020-03-13 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87161 Simon Marchi changed: What|Removed |Added CC||simon.marchi at polymtl dot ca

[Bug c++/83627] New: -Wdelete-non-virtual-dtor doesn't trigger when calling destructor by hand

2017-12-29 Thread simon.marchi at polymtl dot ca
erity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- The -Wdelete-non-virtual-dtor triggers only when using "delete" and not by calling the destructor by ha

[Bug c/82206] New: -Wformat-nonliteral does not warn when passing a non literal to vprintf

2017-09-13 Thread simon.marchi at polymtl dot ca
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- Created attachment 42165 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42165&action=edit Reproducer I have extract

[Bug c++/81159] New: New warning idea: -Wself-move

2017-06-21 Thread simon.marchi at polymtl dot ca
++ Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- clang has this warning, -Wself-move, which warns about things like this: int a = 1; a = std::move (a); I don't see any reason why code like this would be desirable, so any code

[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address

2017-06-02 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 --- Comment #1 from Simon Marchi --- Forgot to mention, the initial problem I stumbled on was this function: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/mach-o-i386.c;h=b2f02415c3ae019224b25184539237d530c5bc7e;hb=HEAD#l

[Bug c/80959] New: -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address

2017-06-02 Thread simon.marchi at polymtl dot ca
NCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: simon.marchi at polymtl dot ca Target Milestone: --- Created attachment 41458 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=4145