https://sourceware.org/bugzilla/show_bug.cgi?id=32942
Paweł Jankowski <pa2.pawel at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pa2.pawel at gmail dot com
--- Comment #3 from Paweł Jankowski <pa2.pawel at gmail dot com> ---
Created attachment 17077
--> https://sourceware.org/bugzilla/attachment.cgi?id=17077&action=edit
Minimal test case for bug 32942
I can confirm that this bug is still present (15.10.2026)
and I accidentally found a test case.
Steps to reproduce:
1. Compile the following code:
#include <windows.h>
int main(void)
{
volatile LONG x = 0;
return InterlockedCompareExchange(&x, 1, 0);
}
with modern mingw version.
I used:
x86_64-w64-mingw32-gcc (GCC) 16.2.1 20261014
from: mingw-gcc-cross project
https://github.com/AmanoTeam/mingw-gcc-cross
The compilation command is:
$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/bin/x86_64-w64-mingw32-gcc \
-c \
-gcodeview \
bug_32942_test_case.c \
-o bug_32942_test_case.o
2. Link with ld:
I used ld version 2.47.50.20261015
(commit be7a7615a84471cea567ea8d60a192356316a0f8)
configured with:
--target=x86_64-w64-mingw32 \
--disable-nls \
--disable-werror \
--disable-gdb \
--disable-gdbserver \
--disable-gprofng \
--disable-sim
The link command is following (uses environment provided by mingw version from
step 1):
$HOME/Desktop/binutils/binutils-build/ld/ld-new \
--sysroot=$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/x86_64-w64-mingw32-ucrt
\
--build-id \
-m i386pep \
-Bdynamic \
-o bug_32942_test_case.exe \
$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/x86_64-w64-mingw32/lib/crt2.o \
$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/x86_64-w64-mingw32/lib/crtbegin.o
\
-L$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/lib/gcc/x86_64-w64-mingw32/16 \
-L$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/lib/gcc \
-L$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/x86_64-w64-mingw32/lib
\
--pdb=bug_32942_test_case.pdb \
bug_32942_test_case.o \
-lmingw32 \
-lgcc \
-lgcc_eh \
-lmingwex \
-lmsvcrt \
-lkernel32 \
-ladvapi32 \
-lshell32 \
-luser32 \
-lkernel32 \
-lmingw32 \
-lgcc \
-lgcc_eh \
-lmingwex \
-lmsvcrt \
-lkernel32 \
$HOME/Desktop/gcc_mingw_cross/mingw-gcc-cross/x86_64-w64-mingw32/lib/crtend.o
3. The error is:
warning: unexpected DEBUG_S_INLINEELINES version 600
---
I found out that first part of patch proposed by Iouri Kharon solves the issue.
I don't have any information about the second part.
During investigating this bug I used the help of AI.
--
You are receiving this mail because:
You are on the CC list for the bug.