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: austin@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: austin@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 <D.10021_22(3), D.10022_23(4)> 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.
Created attachment 21097 [details] output of gcc -v -save-temps
Created attachment 21098 [details] preproccessed .i file
Confirmed. Reduced testcase: typedef unsigned char UCHAR, *PUCHAR; typedef void *HANDLE; typedef struct _NCB { UCHAR ncb_reserve[10]; } NCB, *PNCB; struct NBCmdQueue { PNCB head; }; PNCB *NBCmdQueueFindNBC(struct NBCmdQueue *queue, PNCB ncb) { PNCB *ret = &queue->head; while (ret && *ret != ncb) ret = (PNCB *)((*ret)->ncb_reserve + sizeof(HANDLE)); } caused by phiprop. Thus, mine.
*** Bug 44866 has been marked as a duplicate of this bug. ***
Subject: Bug 44831 Author: rguenth Date: Thu Jul 8 11:38:43 2010 New Revision: 161950 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161950 Log: 2010-07-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/44831 * tree-ssa-phiprop.c (phiprop_insert_phi): Properly build a MEM_REF preserving TBAA info of the original dereference. Dereference the original pointer if the address is not invariant. (propagate_with_phi): Fixup type checks wrt MEM_REFs. Require at least one invariant address that we are going to dereference. * gcc.c-torture/compile/pr44831.c: New testcase. * gcc.dg/tree-ssa/pr21463.c: Adjust. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr44831.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/tree-ssa/pr21463.c trunk/gcc/tree-ssa-phiprop.c
Fixed.