llvm-gcc currently miscompiles this on darwin: typedef struct { double re,im; } DComplex; void bar(DComplex *P, void (*FP)(DComplex)) { FP(*P, *P); } The prototype it emits for "FP" is: void (double, double)* %FP Unfortunately, darwin requires structs to be passed in integer regs regardless of whether the incoming values are FP or not. This means the prototype should be: void (long, long)* %FP or void (int, int, int, int)* %FP ... yuck. -Chris
Fixed. Patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050725/027274.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050725/027275.html This fixes 252.eon, 168.wupwise, 178.galgel, and 301.apsi on Darwin. -Chris