From 1473ab9abb2f9c21064283c108ea5d583566634a Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Mon, 4 May 2015 12:16:23 +0200 Subject: [PATCH] re PR lto/65559 (lto1.exe: internal compiler error: in read_cgraph_and_symbols, at lto/lto.c:2947) PR target/65559 * lto-wrapper.c (run_gcc): Open filename with in binary-mode. From-SVN: r222759 --- gcc/ChangeLog | 6 ++++++ gcc/lto-wrapper.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a0179d1dd6..f2777b075ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-04 Kai Tietz + + PR target/65559 + * lto-wrapper.c (run_gcc): Open filename + with in binary-mode. + 2015-05-03 Sandra Loosemore * doc/extend.texi (Variable Attributes, Type Attributes): Move diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 404cb68e0d1..aa51476d2bc 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -934,7 +934,7 @@ run_gcc (unsigned argc, char *argv[]) filename[p - argv[i]] = '\0'; file_offset = (off_t) loffset; } - fd = open (argv[i], O_RDONLY); + fd = open (filename, O_RDONLY | O_BINARY); if (fd == -1) { lto_argv[lto_argc++] = argv[i]; -- 2.30.2