[Bug debug/52160] gdb ignores line "bar: if(foo)goto bar;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52160 Hannes Domani changed: What|Removed |Added CC||ssbssa at yahoo dot de --- Comment #5 from Hannes Domani --- I can reproduce this issue with gcc-4.6.1, but not with gcc-4.9.1 or newer, so I think this has been fixed already.
[Bug demangler/86152] Failure to demange clone names with digits
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86152 Hannes Domani changed: What|Removed |Added CC||ssbssa at yahoo dot de --- Comment #1 from Hannes Domani --- Looks like this was fixed by this commit: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=be674bdd11d5fa6b20d469e6d6f43c26da9e744f
[Bug target/100402] [10.3 regression] crash with setjmp/longjmp and SEH
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402 --- Comment #11 from Hannes Domani --- > Your testcase does not compile with the C compiler: > > Compiling it with the C++ compiler works for me: Sorry about the c/c++ confusion. > Created attachment 50754 [details] > Tentative fix > > Please give it a try if you can rebuild the compiler. Yes, I can confirm that this fixes the crash with my attached test, and also the original non-reduced application (which is gdb).
[Bug target/100402] Crash in longjmp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402 --- Comment #3 from Hannes Domani --- Created attachment 50745 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50745=edit output of -fdump-tree-optimized
[Bug target/100402] Crash in longjmp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402 --- Comment #2 from Hannes Domani --- Created attachment 50744 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50744=edit assembly (-S)
[Bug target/100402] Crash in longjmp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402 --- Comment #1 from Hannes Domani --- Created attachment 50743 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50743=edit preprocessed code (-E)
[Bug target/100402] New: Crash in longjmp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402 Bug ID: 100402 Summary: Crash in longjmp Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ssbssa at yahoo dot de Target Milestone: --- The following example: -- >8 -- // gcc -O1 test.c #include static jmp_buf buf; static bool stop = false; void call_func(void(*func)(void)) { func(); } void func() { stop = true; longjmp(buf, 1); } int main() { setjmp(buf); while (!stop) call_func(func); return 0; } -- >8 -- Crashes deep in longjmp(): Starting program: C:\src\tests\a.exe gdb: unknown target exception 0xc028 at 0x779dd7e8 Program received signal ?, Unknown signal. 0x779dd7e8 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll (gdb) bt #0 0x779dd7e8 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll #1 0x7797f4ec in ntdll!RtlIsDosDeviceName_U () from C:\Windows\SYSTEM32\ntdll.dll #2 0x07fefe11e5a3 in msvcrt!longjmp () from C:\Windows\system32\msvcrt.dll #3 0x00013fe61620 in func () #4 0x00013fe61627 in call_func () #5 0x00013fe61664 in main () #6 0x00013fe61431 in __tmainCRTStartup () at C:/gcc/src/mingw-w64-v8.0.0/mingw-w64-crt/crt/crtexe.c:345 #7 0x00013fe615b6 in mainCRTStartup () at C:/gcc/src/mingw-w64-v8.0.0/mingw-w64-crt/crt/crtexe.c:220 Note: Doesn't crash with -O0, or if I change `while (!stop)` to `if (!stop)`. And it also works fine with gcc-10.2, or if I revert both fixes [1] [2] of PR99234. [1] https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=49a714e59194a7c549aa6657676a1b4be4520650 [2] https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=2939b358936bb824330888def98ad848dea41483
[Bug debug/100383] New: cfi sections directive detection fails with binutils 2.36
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100383 Bug ID: 100383 Summary: cfi sections directive detection fails with binutils 2.36 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: ssbssa at yahoo dot de Target Milestone: --- Since binutils 2.36 [1], the objdump output [2] of the cfi sections directive detection command (objdump -j .debug_frame -r conftest.o) changed from: conftest.o: file format pe-x86-64 RELOCATION RECORDS FOR [.debug_frame]: OFFSET TYPE VALUE 001c secrel32 .debug_frame 0020 R_X86_64_64 .text to: conftest.o: file format pe-x86-64 RELOCATION RECORDS FOR [.debug_frame]: OFFSET TYPE VALUE 001c IMAGE_REL_AMD64_SECREL .debug_frame 0020 IMAGE_REL_AMD64_ADDR64 .text So because it's now uppercase SECREL, the `grep secrel` fails. I haven't finished my build yet, but it should work like this: --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3115,7 +3115,7 @@ gcc_GAS_CHECK_FEATURE([cfi sections directive], gcc_cv_as_cfi_sections_directive=no if test "x$gcc_cv_objdump" != x; then if $gcc_cv_objdump -j .debug_frame -r conftest.o 2>/dev/null | \ - grep secrel > /dev/null; then + grep -i secrel > /dev/null; then gcc_cv_as_cfi_sections_directive=yes fi fi [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ec6653d824fef41298fdb384ba74bcbc7be0dc22 [2] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/configure.ac;h=84dceb8074ab4615316e09f1f339ed93eca6d6e9;hb=refs/heads/releases/gcc-10#l3117
[Bug bootstrap/98860] [11 Regression] boostrap failure on MinGW-w64 windows 10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98860 --- Comment #36 from Hannes Domani --- Note: This is a binutils/ld bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27268 And I've sent a patch there: https://sourceware.org/pipermail/binutils/2021-February/115434.html
[Bug c/89807] Incorrect -Wconversion warning when shifting uint32_t with 24
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89807 --- Comment #1 from Hannes Domani --- (In reply to Nickolay Kolchin-Semyonov from comment #0) > uint8_t a = (v >> 24) & 0xFF; // ERROR: produces warning > uint8_t a2 = v >> 24; // ERROR: produces warning I think the '& 0xFF' part is optimized away, so for the warning, this is basically the same code. In unsafe_conversion_p() is an extra check if the result of a bitwise-and operation fits in the target type, and that's the reason the other lines don't get a warning. The following adds a similar check for the result of a right-shift operation: --- gcc/c-family/c-common.c 2020-07-23 08:35:17.296384000 +0200 +++ gcc/c-family/c-common.c 2021-02-14 00:53:07.130219200 +0100 @@ -1488,6 +1488,26 @@ return SAFE_CONVERSION; } } + else if (TREE_CODE (expr) == RSHIFT_EXPR) + { + tree op0 = TREE_OPERAND (expr, 0); + tree op1 = TREE_OPERAND (expr, 1); + + /* Don't warn if the result of an unsigned value, right shifted +by a constant, fits in the target type. */ + if (TYPE_UNSIGNED (TREE_TYPE (op0)) + && TREE_CODE (op1) == INTEGER_CST) + { + int prec_rshift = TYPE_PRECISION (TREE_TYPE (op0)) + - TREE_INT_CST_LOW (op1); + int prec_res = TYPE_PRECISION (type); + if (!TYPE_UNSIGNED (type)) + prec_res--; + + if (prec_rshift <= prec_res) + return SAFE_CONVERSION; + } + } /* Warn for integer types converted to smaller integer types. */ if (TYPE_PRECISION (type) < TYPE_PRECISION (expr_type)) give_warning = UNSAFE_OTHER; PS: This is possibly a dup of PR83122.