public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: pfeifer@dbai.tuwien.ac.at (Gerald Pfeifer) To: gcc-gnats@gcc.gnu.org Subject: target/9506: ABI breakage: structure return Date: Thu, 30 Jan 2003 13:56:00 -0000 [thread overview] Message-ID: <200301301346.h0UDkTOQ066803@naos.dbai.tuwien.ac.at> (raw) >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:
reply other threads:[~2003-01-30 13:56 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=200301301346.h0UDkTOQ066803@naos.dbai.tuwien.ac.at \ --to=pfeifer@dbai.tuwien.ac.at \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).