http://bugs.winehq.org/show_bug.cgi?id=34177
Bug #: 34177 Summary: -pipe makes mingw-g++ work unreliably Product: Wine Version: 1.6-rc5 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: b7.10110111@gmail.com Classification: Unclassified
Created attachment 45461 --> http://bugs.winehq.org/attachment.cgi?id=45461 Test case
How to reproduce: 1. Install mingw from mingw-get-inst-20120426.exe, use default settings. Don't pay attention at log clean error. 2. Do mingw-get upgrade "gcc<4.7" mingw-get upgrade "g++<4.7" (these are versions which should work for Qt-based apps; not sure if "gcc" line is actually needed) 3. Unpack attached test case 4. Now either run build.bat from "wine cmd" there, being inside the test directory, or run: wine c:/mingw/bin/g++ -c -pipe -O2 -o mainwindow.o mw-processed.cpp (you don't need to install Qt since the test file is a c++-preprocessed version, resulting from running "g++ -E") 5. Get the following error: {standard input}: Assembler messages: {standard input}:5343: Error: junk `(%esp)movl $0' after expression {standard input}:5343: Error: too many memory references for `mov' 6. Remove "-pipe" from command, and this works with the same assembly code. This all is quite sensitive to assembly code generated, e.g. remove "-O2" and you don't reproduce the bug; remove some lines from source — and again not reproduced...
Corresponding assembly code which causes the error (from changing "-c" to "-S"), from line 5343: movl %eax, 16(%esp) movl $0, 12(%esp) Seems previous line appears partially (starting from "(") on the next one, and second one is truncated starting from ",". I'm not sure what component has this bug, seems this is related either to string manipulation, or piping data between apps.