User account creation filtered due to spam.

Bug 9506 - [3.2/3.3/3.4 regression] ABI breakage: structure return
Summary: [3.2/3.3/3.4 regression] ABI breakage: structure return
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P3 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2003-01-30 13:56 UTC by Gerald Pfeifer
Modified: 2004-01-17 04:22 UTC (History)
2 users (show)

See Also:
Host: i386-unknown-freebsd4.7
Target: i386-unknown-freebsd4.7
Build: i386-unknown-freebsd4.7
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2003-01-30 13:56:00 UTC
	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  <>

	  * 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

3.4 20030130 (experimental)

System: FreeBSD 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Jan 9 09:25:29 CET 2003 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

	#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".
Comment 1 Gerald Pfeifer 2003-01-30 13:56:00 UTC
	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
	  gcc/config/i386% grep DEFAULT_PCC_STRUCT_RETURN i386.c | wc -l
Comment 2 Gerald Pfeifer 2003-01-30 13:59:42 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed, and the bug indentified.
Comment 3 Gerald Pfeifer 2003-02-02 22:04:37 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed by
    2003-01-31  Jan Hubicka  <>
            PR c/9506
            * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN.