This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins
- From: Patrick Marlier <patrick dot marlier at gmail dot com>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, aldyh at redhat dot com, Iain Sandoe <developer at sandoe-acoustics dot co dot uk>
- Date: Sat, 21 Jan 2012 17:57:16 -0500
- Subject: Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins
- References: <20120120130449.5729E3BE18@mailhost.lps.ens.fr>
On 01/20/2012 08:04 AM, Dominique Dhumieres wrote:
The following patch fixes the problem.
The test fails on *-apple-darwin*: pr51916.
TIA
Dominique
Dominique or Iain, may I ask you to test this patch on darwin? I have a
sporadic access to a darwin machine.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
--
Patrick.
PR lto/51916
* lto-object.c (LTO_SEGMENT_NAME): Define segment name.
(lto_obj_file_open): Use it.
Index: lto-wrapper.c
===================================================================
--- lto-wrapper.c (revision 183345)
+++ lto-wrapper.c (working copy)
@@ -54,6 +54,11 @@ along with GCC; see the file COPYING3. If not see
/* End of lto-streamer.h copy. */
+/* Segment name for LTO sections. This is only used for Mach-O.
+ FIXME: This needs to be kept in sync with darwin.c. */
+
+#define LTO_SEGMENT_NAME "__GNU_LTO"
+
int debug; /* true if -save-temps. */
int verbose; /* true if -v. */
@@ -479,7 +484,8 @@ run_gcc (unsigned argc, char *argv[])
fd = open (argv[i], O_RDONLY);
if (fd == -1)
continue;
- sobj = simple_object_start_read (fd, file_offset, NULL, &errmsg, &err);
+ sobj = simple_object_start_read (fd, file_offset, LTO_SEGMENT_NAME,
+ &errmsg, &err);
if (!sobj)
{
close (fd);