Created attachment 11563 [details] working .S file If mingw-w64 is configured with --enable-experimental, a crossed gcc compiler (--build=x86_64-linux-gnu --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32) cannot compile due to gas: /home/builder/binutils-2.31.1/gas/read.c:5366 (If mingw-w64-crt is configured without --enable-experimental, everything works just fine) I've attached two .S files. One where crt is configured without --enable-experimental, and one where is it enabled.
Created attachment 11564 [details] not working .S file
You attached the same file twice.
Created attachment 11566 [details] not working .S file
Part of hexdump -c display of good file. 0000060 \t . a s c i i " H e l l o w 0000070 o r l d ! \ 0 " \r \n \t . t e x t The same in the bad file. 0000060 \t . a s c i i " H e l l o w 0000070 o r l d ! \ \0 " \r \n \t . t e x t The difference is that the bad file has an embedded NUL in the source. That's a bug in your gcc, but gas shouldn't give an internal error on user input, so it's a bug in gas too.
A bug in GCC triggered by a setting in mingw-w64-crt :/
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0c56b5cfb68cd099e00f6fdb5ad08061c7b16b79 commit 0c56b5cfb68cd099e00f6fdb5ad08061c7b16b79 Author: Alan Modra <amodra@gmail.com> Date: Fri Jan 25 09:34:14 2019 +1030 PR24125, Assertion failure with embedded NULs in string An assertion that can be triggered by user input is wrong, so remove it. I believe the NUL would have been accepted before the PR20902 patch. PR 20902 PR 24125 * read.c (stringer): Delete assertion.
Fixed.