[Bug target/43869] ms_abi - sysv_abi passing float arguments incorrectly

2010-04-25 Thread m dot b dot lankhorst at gmail dot com


--- Comment #4 from m dot b dot lankhorst at gmail dot com  2010-04-25 
14:41 ---
Created an attachment (id=20483)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20483action=view)
Patch that fixes the testcase

It appears that SSE_REGPARM_MAX will change based on ix86_cfun_abi(), so using
SSE_REGPARM_MAX will cause sse regparm max to be 4, if calling a sysv function
from a ms_abi function. The attached patch will clean up some of the issues.

setup_incoming_varargs_64 will also assume the sysv abi now, since
setup_incoming_varargs_ms_64 is a separate function


-- 


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



[Bug c/43869] New: ms_abi - sysv_abi passing float arguments incorrectly

2010-04-23 Thread m dot b dot lankhorst at gmail dot com
Float arguments are passed incorrectly from a ms_abi function to a sysv
function, as can be witnessed by a simple testcase, which fails on all
optimizations. I don't think this is a regression, as wine always failed on
that testcase.


-- 
   Summary: ms_abi - sysv_abi passing float arguments incorrectly
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: m dot b dot lankhorst at gmail dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug c/43869] ms_abi - sysv_abi passing float arguments incorrectly

2010-04-23 Thread m dot b dot lankhorst at gmail dot com


--- Comment #1 from m dot b dot lankhorst at gmail dot com  2010-04-23 
18:38 ---
Created an attachment (id=20474)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20474action=view)
testcase

testcase that fails


-- 


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



[Bug c/42079] New: missing unitialized warning on simple testcase

2009-11-17 Thread m dot b dot lankhorst at gmail dot com
This code should warn that foo is used uninitialized, but it doesn't.. gcc 4.3
and gcc 4.4 both fail to report a warning

extern void do_something(void **foo);
extern int cond(void);

int main(int argc, char *argv[])
{
void *foo;
if (cond())
do_something(foo);
*argv = foo;
return 0;
}


-- 
   Summary: missing unitialized warning on simple testcase
   Product: gcc
   Version: 4.4.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: m dot b dot lankhorst at gmail dot com


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



[Bug c/38366] gcc doesn't call functions that are struct arguments correctly

2008-12-02 Thread m dot b dot lankhorst at gmail dot com


--- Comment #1 from m dot b dot lankhorst at gmail dot com  2008-12-02 
09:08 ---
Created an attachment (id=16806)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16806action=view)
testcase

Testcase that should return '1 2 3 4 5 6 7', but on my computer returns '1 2 3
4 5 6 1' (last number being undefined)


-- 


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



[Bug c/38366] New: gcc doesn't call functions that are struct arguments correctly

2008-12-02 Thread m dot b dot lankhorst at gmail dot com
If a function pointer is part of a struct, and it is called from a function
marked with ms_abi, the 7th argument will be placed wrongly on the stack. It is
placed at 20(%rsp) instead of at (%rsp), which means that programs like wine
will fail.

Testcase attached


-- 
   Summary: gcc doesn't call functions that are struct arguments
correctly
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: m dot b dot lankhorst at gmail dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug target/38227] gcc fails to correctly pass arguments with ms_abi function pointers

2008-11-23 Thread m dot b dot lankhorst at gmail dot com


--- Comment #4 from m dot b dot lankhorst at gmail dot com  2008-11-23 
21:11 ---
Patch seems to fix the testcase


-- 


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



[Bug c/38227] New: gcc fails to correctly pass arguments with ms_abi function pointers

2008-11-22 Thread m dot b dot lankhorst at gmail dot com
When calling function pointers that have been marked with
__attribute__((ms_abi)) the arguments will not be passed correctly.

A simple testcase is enough to expose the wrong behavior.


-- 
   Summary: gcc fails to correctly pass arguments with ms_abi
function pointers
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: m dot b dot lankhorst at gmail dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug c/38227] gcc fails to correctly pass arguments with ms_abi function pointers

2008-11-22 Thread m dot b dot lankhorst at gmail dot com


--- Comment #1 from m dot b dot lankhorst at gmail dot com  2008-11-22 
13:33 ---
Created an attachment (id=16748)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16748action=view)
Minimal testcase

Compile with amd64 compiler without optimizations and run it.

Expected: Number is: 1234567890abcdef
Actual result: Number is: 0 (May vary)


-- 


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



[Bug c++/28498] New: fstack-protector causes crash in combination with -Os

2006-07-26 Thread m dot b dot lankhorst at gmail dot com
When compiling c++ code, you can get an error similar to this one:

/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/bits/stl_algo.h:
In function '_RandomAccessIterator
std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _Tp)
[with _RandomAccessIterator = __gnu_cxx::__normal_iteratorQRect*,
std::vectorQRect, std::allocatorQRect  , _Tp = QRect]':
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/bits/stl_algo.h:2182:
internal compiler error: Segmentation fault

according to gcc -v, cc1plus was run with

/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/cc1plus -quiet -v -D_GNU_SOURCE -D__PIC__
-DPIC windowgrabber.cc -fPIC -fstack-protector-all -quiet -dumpbase
windowgrabber.cc -mtune=pentiumpro -auxbase windowgrabber -Os -version -fPIC
-fstack-protector-all -o /tmp/cchIBKrS.s

I'll attach source


-- 
   Summary: fstack-protector causes crash in combination with -Os
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: m dot b dot lankhorst at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug middle-end/28498] fstack-protector causes crash in combination with -Os

2006-07-26 Thread m dot b dot lankhorst at gmail dot com


--- Comment #1 from m dot b dot lankhorst at gmail dot com  2006-07-26 
17:42 ---
Created an attachment (id=11949)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11949action=view)
The source mentioned in description

Source that won't compile


-- 


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