public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/9506: ABI breakage: structure return
@ 2003-01-30 13:56 Gerald Pfeifer
0 siblings, 0 replies; only message in thread
From: Gerald Pfeifer @ 2003-01-30 13:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 9506
>Category: target
>Synopsis: ABI breakage: structure return
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 30 13:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.4 20030130 (experimental)
>Organization:
>Environment:
System: FreeBSD naos.dbai.tuwien.ac.at 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Jan 9 09:25:29 CET 2003 root@aludra.dbai.tuwien.ac.at:/usr/src/sys/compile/DBAI-MP i386
host: i386-unknown-freebsd4.7
build: i386-unknown-freebsd4.7
target: i386-unknown-freebsd4.7
configured with: /sw/test/gcc/cvs/configure --prefix=/sw/gcc-current --enable-languages=c,c++ --disable-checking
>Description:
Unless I am completely mistaken, the following patch is responsible for an
ABI change I am seeing on FreeBSD (and apparently also Cygwin, Interix,
OpenBSD, NetBSD) on i386 platforms for GCC 3.2.1 as well as the 3.3 branch
and mainline:
Thu Oct 31 18:08:00 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.c (override_options): Set defaults for flag_omit_frame_pointer,
flag_asynchronous_unwind_tables, flag_pcc_struct_return.
* i386.c (optimization_options): Set flag_omit_frame_pointer,
flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2.
Do not clear -momit-leaf-frame-pointer when profiling.
(ix86_frame_pointer_required): Frame pointer is always required when
profiling.
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01887.html
>How-To-Repeat:
#include <stdio.h>
#include <stdlib.h>
int main() {
div_t d = div(20,5);
printf("20/5 = %d mod %d\n",d.quot,d.rem);
}
will print something different from "20/5 = 4 mod 0".
>Fix:
What I believe is wrong with this patch is that it _completely_ ignores
DEFAULT_PCC_STRUCT_RETURN when setting flag_pcc_struct_return:
gcc/config/i386% grep DEFAULT_PCC_STRUCT_RETURN *.h | wc -l
19
gcc/config/i386% grep DEFAULT_PCC_STRUCT_RETURN i386.c | wc -l
0
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-30 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-30 13:56 target/9506: ABI breakage: structure return Gerald Pfeifer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).