[Bug c++/107543] New: c-family/c-cppbuiltin.cc: Undefine __GNUC_STDC_INLINE__ in C++ mode?

2022-11-06 Thread i at maskray dot me via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- -fgnu89-inline / C99 / C++ inline modes are all different. For C++, perhaps neither __GNUC_STDC_INLINE__ nor __GNUC_GNUC_INLINE__

[Bug c/107963] New: Support __attribute__((disable_sanitizer_instrumentation))

2022-12-03 Thread i at maskray dot me via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Clang introduced the attribute in https://reviews.llvm.org/D108029 (2021-08). It disables instrumentations for all kinds of sanitizers. For non

[Bug sanitizer/78204] ‘no_sanitize’ attribute directive ignored [-Wattributes]

2022-12-04 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78204 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #8 from

[Bug sanitizer/107963] Support __attribute__((disable_sanitizer_instrumentation))

2022-12-04 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107963 --- Comment #3 from Fangrui Song --- GCC doesn't implement -fsanitize=memory. In the absence of it, __attribute__((disable_sanitizer_instrumentation)) is like __attribute__((no_sanitize("all"))). When -fsanitize=memory is implemented, the two a

[Bug c/105576] New: x86: Support a machine constraint to get raw symbol name

2022-05-11 Thread i at maskray dot me via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- An raw symbolic operand is useful in inline asm (e.g. in C++ to get the mangled name, or in C to let the compiler do some asm checking). In aarch64 and

[Bug target/105576] x86: Support a machine constraint to get raw symbol name

2022-05-13 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576 --- Comment #5 from Fangrui Song --- (In reply to Hongtao.liu from comment #4) > constraint "i" + "%p0"? > > asm (".pushsection .xxx,\"aw\"; .dc.a %p0; .popsection" :: "i"(addr)); // > supported on aarch64 and riscv > asm (".pushsection .xx

[Bug target/77882] [Aarch64] Add 'naked' function attribute

2022-05-24 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77882 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #11 from

[Bug c/101275] New: [RISCV] Document the machine constraint 'S' and make it non-internal

2021-06-30 Thread i at maskray dot me via Gcc-bugs
ty: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- An absolute symbolic operand is useful in inline asm. In aarch64 and x86-64, there is a documented (supported) approach. // aar

[Bug c++/71482] Add -Wglobal-constructors warning option

2021-07-24 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71482 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #5 from

[Bug libgcc/99759] morestack.S should support .init_array.0 besides .ctors.65535

2021-08-11 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99759 --- Comment #3 from Fangrui Song --- (In reply to Alan Modra from comment #2) > > this means the ctors.65535 will come last. > Nope, it will come first. And since DT_INIT_ARRAY pointers are executed in > the order they appear in the array, it wi

[Bug tree-optimization/83022] malloc & memset -> calloc is not always an optimization

2021-08-20 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83022 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #5 from

[Bug tree-optimization/83022] malloc & memset -> calloc is not always an optimization

2021-08-20 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83022 --- Comment #6 from Fangrui Song --- The issue succeeded to waste some time of MySQL developers BTW: http://smalldatum.blogspot.com/2017/11/a-new-optimization-in-gcc-5x-and-mysql.html

[Bug sanitizer/102317] signed integer overflow sanitizer cannot work well with -fno-strict-overflow

2024-02-14 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102317 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #13

[Bug middle-end/113987] New: Binding a reference to an uninitialized data member should not cause -Wuninitialized

2024-02-18 Thread i at maskray dot me via Gcc-bugs
Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- https://godbolt.org/z/G7ndsTv5c (from https://github.com/llvm/llvm-project/pull/81179#issuecomment-1937082113

[Bug middle-end/113987] Binding a reference to an uninitialized data member should not cause -Wuninitialized

2024-02-18 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113987 --- Comment #1 from Fangrui Song --- BTW, https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/uninitialized.cpp has many member initializer list examples

[Bug sanitizer/114217] -fsanitize=alignment false positive with intended unaligned struct member access

2024-03-04 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #14

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2024-03-14 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #5 from

[Bug c++/114357] New: C++: Support the no_destroy attribute

2024-03-15 Thread i at maskray dot me via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Clang supports [[clang::no_destroy]] (alternative form: `__attribute__((no_destroy))`) to disable exit-time destructors of variables of static or thread local storage duration. * July

[Bug tree-optimization/19661] unnecessary atexit calls emitted for static objects with empty destructors

2024-03-16 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19661 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #17 from

[Bug c++/109267] New: -Og generates empty functions with .cfi_startproc/.cfi_endproc that conflict with other functions

2023-03-23 Thread i at maskray dot me via Gcc-bugs
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- cat > lib.cpp <<'eof' #include "lib.h" #include void te

[Bug target/109349] New: Add --print-supported-extensions

2023-03-30 Thread i at maskray dot me via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Clang may add a RISC-V specific option --print-supported-extensions to list implemented ISA extensions with the corresponding versions: https://reviews.llvm.org/D146054 I think it will be

[Bug c/109489] New: [ubsan] Support -fsanitize-trap=

2023-04-12 Thread i at maskray dot me via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Clang has supported -fsanitize-trap=undefined and many fine-grained options[1] e.g. -fsanitize-trap=alignment since 2015. -fsanitize-undefined-trap-on-error is a deprecated alias for -fsanitize

[Bug sanitizer/109489] [ubsan] Support -fsanitize-trap=

2023-04-16 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109489 Fangrui Song changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug debug/109591] New: Multiple -fdebug-prefix-map= prefixes match, which one wins?

2023-04-21 Thread i at maskray dot me via Gcc-bugs
Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- mkdir -p a/b/c echo 'int main(){}' > a/b/c/d.c ~/Dev/gcc/out/release/gcc/xgcc -B ~/Dev/gcc/out/release/gcc -g -c -fdebug-prefi

[Bug debug/109591] Multiple -fdebug-prefix-map= prefixes match, which one wins?

2023-04-21 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109591 --- Comment #3 from Fangrui Song --- (In reply to Andrew Pinski from comment #2) > GCC added -fdebug-prefix-map= back in r0-82686-gc8aea42ce2c691e4e8 2 years > before clang was first release . So Thank you for the super rapid response! I

[Bug c/109707] New: Skip __attribute__((naked)) functions for -pg and -finstrument-functions

2023-05-02 Thread i at maskray dot me via Gcc-bugs
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- The asm in a naked function may reasonably expect the argument registers and the return address register (if present) to be live

[Bug c/109707] Skip __attribute__((naked)) functions for -pg and -finstrument-functions

2023-05-02 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109707 --- Comment #1 from Fangrui Song --- I came here from a PR for Clang: https://github.com/llvm/llvm-project/issues/62504

[Bug middle-end/109707] naked attribute should imply the no_instrument_function attribute

2023-05-02 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109707 --- Comment #4 from Fangrui Song --- (In reply to Andrew Pinski from comment #2) > As a workaround, you could add the attribute no_instrument_function. Yes. I thought of this possibility, but pcc's reply on https://github.com/llvm/llvm-project/

[Bug target/105576] x86: Support a machine constraint to get raw symbol name

2023-05-04 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576 --- Comment #6 from Fangrui Song --- (In reply to Hongtao.liu from comment #4) > constraint "i" + "%p0"? > > asm (".pushsection .xxx,\"aw\"; .dc.a %p0; .popsection" :: "i"(addr)); // > supported on aarch64 and riscv > asm (".pushsection .xx

[Bug target/105576] x86: Support a machine constraint to get raw symbol name

2024-05-27 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576 --- Comment #14 from Fangrui Song --- > Is there a way to capture a method address in inline asm that works in > -fPIC mode? Specifically I want to capture the address of a static > method that's in a class that's local to a function. I'm able t

[Bug c/110094] New: Support __builtin_mem*_inline

2023-06-02 Thread i at maskray dot me via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Clang introduced `__builtin_memcpy_inline` (https://reviews.llvm.org/D73543) in 2020 and `__builtin_memset_inline` (https://reviews.llvm.org/D126903) in 2022. The two builtin functions expand

[Bug middle-end/110729] New: -fpatchable-function-entries: __patchable_function_entries has wrong sh_link

2023-07-18 Thread i at maskray dot me via Gcc-bugs
Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Noticed by Ziwei Mao. % cat a.c void f() {} void g() {} void h() {} % gcc -ffunction-sections -fpatchable-function-entry

[Bug target/105576] x86: Support a machine constraint to get raw symbol name

2024-01-10 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576 --- Comment #8 from Fangrui Song --- I've encountered another use case related to metadata sections (establish an artificial reference for linker garbage collection purposes) namespace ns { extern int var; } // defined in another translation u

[Bug target/104816] -fcf-protection=branch should generate endbr instead of notrack jumps

2024-01-18 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #13

[Bug target/105576] x86: Support a machine constraint to get raw symbol name

2024-01-30 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576 Fangrui Song changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

<    1   2