[Bug c/50987] New: powerpc: size of unnamed array is negative when compiling wine

2011-11-03 Thread austinenglish at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50987

 Bug #: 50987
   Summary: powerpc: size of unnamed array is negative when
compiling wine
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: austinengl...@gmail.com


Found while compiling wine on PowerPC. This did not occur on an older powerpc I
used on the gcc compiler farm, but I'm not sure what gcc/glibc/etc. versions
they had.

Bug is present in, at least:
gcc-4.0.0
gcc-4.1.0
gcc-4.2.0
gcc-4.6.1
trunk 4.7.0 2003

reduced testcase:
[austin@gcc1-power7 tests]$ cat generated.i
 typedef int BOOL, *PBOOL, *LPBOOL;
 typedef int INT, *PINT, *LPINT;
  typedef struct _CACHE_DESCRIPTOR { BYTE Level; BYTE Associativity;   
 WORD LineSize; DWORD Size; PROCESSOR_CACHE_TYPE Type; }
 *HDC;
  typedef BOOL ( *ABORTPROC)(HDC, INT);
   static void test_pack_ABORTPROC(void) { extern void __C_ASSERT__(int
[(sizeof(ABORTPROC) == 4)?1:-1]); TEST_TYPE_ALIGN (ABORTPROC, 4) }

gcc generated.i
generated.i:3:18: error: unknown type name 'BYTE'
generated.i:3:18: error: unknown type name 'BYTE'
generated.i:3:18: error: unknown type name 'WORD'
generated.i:3:18: error: unknown type name 'DWORD'
generated.i:3:18: error: unknown type name 'PROCESSOR_CACHE_TYPE'
generated.i: In function 'test_pack_ABORTPROC':
generated.i:6:4: error: size of unnamed array is negative
generated.i:6:124: error: expected expression before 'ABORTPROC'
generated.i:6:138: error: expected ';' before '}' token

if you have wine available, try compiling dlls/gdi32/tests/generated.c

[austin@gcc1-power7 tests]$ uname -a
Linux gcc1-power7.osuosl.org 3.1.0-0.rc9.git0.2.fc16.kh.ppc64 #1 SMP Wed Oct 12
22:41:01 UTC 2011 ppc64 ppc64 ppc64 GNU/Linux

the same works on (at least) x86/x86_64.

See also http://bugs.winehq.org/show_bug.cgi?id=28981


[Bug c/50987] powerpc: size of unnamed array is negative when compiling wine

2011-11-03 Thread austinenglish at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50987

austinenglish at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #3 from austinenglish at gmail dot com 2011-11-03 22:21:26 UTC ---
Yeah, my bad. Wine automatically sets -m32 on x86_64, but not other
architectures. The other powerpc machine I used was apparently 32-bit.

Sorry for the noise.


[Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64

2015-09-28 Thread austinenglish at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66697

--- Comment #1 from austinenglish at gmail dot com ---
We're now up to at least 9 bugs reported in Wine's bugzilla about this issue,
it does not appear to be an isolated problem. E.g., Unity and for some
applications, like Planetside 2, there is no 32-bit version, so the game is
completely broken on wine.

Is there any plan to implement this in a future version?


[Bug c/66782] New: Unable to run 64-bit wine after MS->SYSV register changes

2015-07-06 Thread austinenglish at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66782

Bug ID: 66782
   Summary: Unable to run 64-bit wine after MS->SYSV register
changes
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: austinenglish at gmail dot com
  Target Milestone: ---

Regression, introduced by:
[austin@localhost gcc]$ git bisect bad
96c09a553634967a94b5fd4ec3c46b58ffca1700 is the first bad commit
commit 96c09a553634967a94b5fd4ec3c46b58ffca1700
Author: uros 
Date:   Sun Sep 21 15:13:14 2014 +

* config/i386/i386.c (ix86_expand_call): Generate MS->SYSV extra
clobbered registers using clobber_reg.  Remove UNSPEC decoration.
* config/i386/i386.md (unspec) : Remove.
(*call_rex64_ms_sysv): Remove.
(*call_value_rex64_ms_sysv): Ditto.
* config/i386/predicates.md (call_rex64_ms_sysv_operation): Remove.

testsuite/ChangeLog:

* gcc.target/i386/avx-vzeroupper-16.c (dg-final): Remove check
for call_value_rex64_ms_sysv.
* gcc.target/i386/avx-vzeroupper-17.c (dg-final): Ditto.
* gcc.target/i386/avx-vzeroupper-18.c (dg-final): Remove check
for call_rex64_ms_sysv.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215428
138bc75d-0d04-0410-961f-82ee72b054a4

:04 04 106752531e7926ba25b0617448d4ba45911c9dad
83a0c6ad4d406be569059bf7b59320804024d1c3 M  gcc


See downstream issue report here:
https://bugs.winehq.org/show_bug.cgi?id=38653


[Bug c/66865] New: wine segfaults from gcc in trunk (r225757)

2015-07-14 Thread austinenglish at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66865

Bug ID: 66865
   Summary: wine segfaults from gcc in trunk (r225757)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: austinenglish at gmail dot com
  Target Milestone: ---

It's a regression, I bisected it to:
a19b6344800f6faef095c6aa3b0c7bef5e29b2fc is the first bad commit
commit a19b6344800f6faef095c6aa3b0c7bef5e29b2fc
Author: kugan 
Date:   Tue Jun 2 22:53:15 2015 +

gcc/ChangeLog:

2015-06-03  Kugan Vivekanandarajah  
Zhenqiang Chen  

PR target/65768
* cprop.c (try_replace_reg): Check cost of constants before
propagating.


gcc/testsuite/ChangeLog:

2015-06-03  Kugan Vivekanandarajah  

PR target/65768
* gcc.target/arm/maskdata.c: Remove -fno-gcse.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224048
138bc75d-0d04-0410-961f-82ee72b054a4

:04 04 7e7261a710baead7ef64e15ceb25c4b30f6e7616
8070e793a5b40e1c2f4b5e873e12e6de73b35bf5 M  gcc

still in trunk. It should be noted that even with this fixed, there's are at
least two other issues that are causing wine to crash on start (#66782, already
fixed and #66838, patch available). With those patched, and this change
reverted, wineboot is able to successfully run (tested on r225757).


[Bug c/66865] wine segfaults from gcc in trunk (r225757) (regression)

2015-07-14 Thread austinenglish at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66865

--- Comment #1 from austinenglish at gmail dot com ---
Created attachment 35973
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35973&action=edit
revert patch

These two patches get wine working in trunk.


[Bug rtl-optimization/66865] [6 Regression] wine64 segfaults from gcc in trunk (r225757) (regression)

2015-07-14 Thread austinenglish at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66865

austinenglish at gmail dot com changed:

   What|Removed |Added

Summary|[6 Regression] wine |[6 Regression] wine64
   |segfaults from gcc in trunk |segfaults from gcc in trunk
   |(r225757) (regression)  |(r225757) (regression)

--- Comment #5 from austinenglish at gmail dot com ---
(In reply to kugan from comment #4)
> Ok, I downloaded wine-1.7.47.tar.bz2 and built it with trunk gcc. What do I
> have to do to reproduce this please?

Sorry, forgot to specify it only happens with wine64. In any case, to
reproduce:

tar xjvf wine-1.7.47.tar.bz2
cd wine
./configure --enable-win64 --disable-tests
make -j4
./wine wineboot

Expected behavior:
wineboot runs to completion, exits 0

Actual behavior:
wine segfaults

as I pointed out previously, if you don't apply the patch for bug 66838, you
will likely see that wine crashes instead of exiting 0 (but you will only see
that with the cprop.c changes reverted)

Hope that helps, please let me know if anything is unclear.


[Bug rtl-optimization/66865] [6 Regression] wine64 segfaults from gcc in trunk (r225757) (regression)

2015-07-17 Thread austinenglish at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66865

--- Comment #15 from austinenglish at gmail dot com ---
(In reply to Uroš Bizjak from comment #14)
> Can you please retry now that PR 66782 and PR 66838 are both fixed on
> mainline and gcc-5 branch?

Works here in r225965 / da5e6421269c9683f17fb5e6e3bacfec50f22239.

[Bug c/49053] New: Please add an option to catch empty statements (-Wempty-statement ?)

2011-05-18 Thread austinenglish at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49053

   Summary: Please add an option to catch empty statements
(-Wempty-statement ?)
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: austinengl...@gmail.com


It would be useful to have an option to catch empty statements, e.g.:

#include 
int main(void)
{
;;
return 0;
}

a la -Wempty-body does currently.

I've seen this happen a few times recently in Wine, especially when expanding
macros, e.g,.:
http://source.winehq.org/git/wine.git/commitdiff/a67941d3936ef9db9c56db816393ec8187c91274


[Bug c/46468] New: enabling -fomit-frame-pointer by default breaks Wine

2010-11-13 Thread austinenglish at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46468

   Summary: enabling -fomit-frame-pointer by default breaks Wine
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: austinengl...@gmail.com


I've noticed lately that 'winetricks -q fm20' fails on my machine. I finally
got around to running an svn bisect:

=
Regression found!
Last good revision: r163193
First bad revision:

r163196 | hjl | 2010-08-12 09:39:37 -0700 (Thu, 12 Aug 2010) | 16 lines

Turn on -fomit-frame-pointer by default for 32bit Linux/x86.

2010-08-12  H.J. Lu  
Uros Bizjak  

* config.gcc: Handle --enable-frame-pointer.

* configure.ac: Add --enable-frame-pointer.
* configure: Regenerated.

* config/i386/i386.c (USE_IX86_FRAME_POINTER): Default to 0.
(override_options): If not configured with --enable-frame-pointer,
enable -fomit-frame-pointer (but not for TARGET_MACHO or when
optimizing for size), -fasynchronous-unwind-tables and
-maccumulate-outgoing-args by default.

=

so, I tried compiling wine with -fno-omit-frame-pointer, still fails. The only
way to get a working wine was to compile gcc with --enable-frame-pointer.

The wine failure isn't too helpful:
$ wine /home/austin/.wine/dosdevices/c:/winetrickstmp/setup /qt
wine client error:3b: write: Bad file descriptor
err:seh:raise_exception Unhandled exception code c005 flags 0 addr
0x7dd247be
wine client error:3b: write: Bad file descriptor

however, the bug seems to be gcc producing bad code unless
--enable-frame-pointer is used.

-- 
-Austin


[Bug c/44831] New: internal compiler error: verify_stmts failed when compiling wine

2010-07-05 Thread austinenglish at gmail dot com
Howdy,

This is a regression in gcc, but I haven't yet bisected it. Hopefully there is
enough information to fix it without bisecting.

gcc version used:
aus...@midna:~/wine-git/dlls/netapi32$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure : (reconfigured) ./configure : (reconfigured)
./configure
Thread model: posix
gcc version 4.6.0 20100705 (experimental) (GCC) 

when compiling wine, it fails with:
aus...@midna:~/wine-git/dlls/netapi32$ make
gcc -m32 -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_SVRAPI_
-D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings
-Wpointer-arith  -g -O2  -o nbcmdqueue.o nbcmdqueue.c
nbcmdqueue.c: In function ‘NBCmdQueueFindNBC’:
nbcmdqueue.c:92:14: error: Incompatible types in PHI argument 1
struct _NCB *

UCHAR

D.10020_19 = PHI 

nbcmdqueue.c:92:14: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [nbcmdqueue.o] Error 1

system is ubuntu lucid, uname -a:
Linux midna 2.6.31-11-rt #154-Ubuntu SMP PREEMPT RT Wed Jun 9 13:40:34 UTC 2010
x86_64 GNU/Linux

expected behavior: wine compiles
actual behavior: internal compiler error

I'll attach the output of gcc -v -save-temps as well as the preprocessed
source.


-- 
   Summary: internal compiler error: verify_stmts failed when
compiling wine
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: austinenglish at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44831



[Bug c/44831] internal compiler error: verify_stmts failed when compiling wine

2010-07-05 Thread austinenglish at gmail dot com


--- Comment #1 from austinenglish at gmail dot com  2010-07-06 01:06 ---
Created an attachment (id=21097)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21097&action=view)
output of gcc -v -save-temps


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44831



[Bug c/44831] internal compiler error: verify_stmts failed when compiling wine

2010-07-05 Thread austinenglish at gmail dot com


--- Comment #2 from austinenglish at gmail dot com  2010-07-06 01:08 ---
Created an attachment (id=21098)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21098&action=view)
preproccessed .i file


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44831



[Bug target/46468] enabling -fomit-frame-pointer by default breaks Wine

2011-06-28 Thread austinenglish at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46468

--- Comment #18 from austinenglish at gmail dot com 2011-06-29 02:16:04 UTC ---
This bug is now affecting the World of Warcraft launcher, which crashes:
http://bugs.winehq.org/show_bug.cgi?id=27057

I've was able to narrow it down to a single .c file in wine (and a single
patch):
http://source.winehq.org/git/wine.git/commitdiff/dc96c688d397eb4ef1392ee6a98f3eb6b176dc56

I'll attach preprocessed files with good/bad gcc.

command used was:
gcc -E -I. -I. -I../../include -I../../include  -D__WINESRC__
-DCOM_NO_WINDOWS_H -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wempty-body -Wstrict-prototypes -Wtype-limits
-Wwrite-strings -Wpointer-arith -Wlogical-op  -g -O2  mutation.c &> ~/output.i

good gcc:
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

bad gcc:
gcc (GCC) 4.6.0 20100812 (experimental)
(this is at commit fc00a76a26bb71539e8e4355e824986baf852f32 / Turn on
-fomit-frame-pointer by default for 32bit Linux/x86.)


[Bug target/46468] enabling -fomit-frame-pointer by default breaks Wine

2011-06-28 Thread austinenglish at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46468

--- Comment #19 from austinenglish at gmail dot com 2011-06-29 02:20:27 UTC ---
Created attachment 24627
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24627
bad preprocessed file


[Bug target/46468] enabling -fomit-frame-pointer by default breaks Wine

2011-06-28 Thread austinenglish at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46468

--- Comment #20 from austinenglish at gmail dot com 2011-06-29 02:20:42 UTC ---
Created attachment 24628
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24628
good preproccessed file