public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/66228] New: Compiling simple program with -flto -O1 causes mad behaviour
@ 2015-05-20 20:38 tk@the-tk.com
  2015-05-21  8:55 ` [Bug lto/66228] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tk@the-tk.com @ 2015-05-20 20:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66228

            Bug ID: 66228
           Summary: Compiling simple program with -flto -O1 causes mad
                    behaviour
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tk@the-tk.com
  Target Milestone: ---

Created attachment 35582
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35582&action=edit
This is the wtf.i file left over from running gcc -v -save-temps -flto -O1
wtf.c

This code, when compiled with -O1 and -flto and ran with no arguments passed
prints:

./a.out: Incorrect number of arguments
./a.out: WTF?

And exits returning 1.

This behaviour is obviously incorrect.

This has been tested on versions (various people):
4.8.4
4.9.2 20150304
5.1.0 20150505
5.1.1 20150519

The version I am personally using is 4.9.2 20150304.

Here is the output of `gcc -v -save-temps -flto -O1 wtf.c':

Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.9-20150304/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.2 20150304 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps'
'-flto' '-O1' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/cc1 -E -quiet -v -D
_FORTIFY_SOURCE=2 wtf.c -mtune=generic -march=x86-64 -fPIE
-fstack-protector-strong -flto -O1 -fpch-preprocess -o wtf.i
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include
 /usr/local/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps'
'-flto' '-O1' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/cc1 -fpreprocessed wtf.i -quiet
-dumpbase wtf.c -mtune=generic -march=x86-64 -auxbase wtf -O1 -version -fPIE
-fstack-protector-strong -flto -o wtf.s
GNU C (GCC) version 4.9.2 20150304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.2 20150304 (prerelease), GMP version
6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.2
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.2 20150304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.2 20150304 (prerelease), GMP version
6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.2
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: de1e8c8938fc18eb6d7bf643b5ef22cd
COLLECT_GCC_OPTIONS='-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps'
'-flto' '-O1' '-mtune=generic' '-march=x86-64'
 as -v --64 -o wtf.o wtf.s
GNU assembler version 2.25.0 (x86_64-unknown-linux-gnu) using BFD version (GNU
Binutils) 2.25.0
COMPILER_PATH=/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps'
'-flto' '-O1' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/collect2 -plugin
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
-plugin-opt=-fresolution=wtf.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -flto
--build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2 -pie
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/Scrt1.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/crti.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/crtbeginS.o
-L/usr/lib/hardening-wrapper/bin -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2
-L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../.. wtf.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/crtendS.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/crtn.o
 /usr/bin/gcc @/tmp/ccxHh0w0.args
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.9-20150304/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.2 20150304 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-fno-trapv' '-fno-strict-overflow' '-mtune=generic'
'-march=x86-64' '-O1' '-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps' '-O1'
'-mtune=generic' '-march=x86-64'
'-fltrans-output-list=/tmp/cckzPbXh.ltrans.out' '-fwpa' '-fresolution=wtf.res'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/lto1 -quiet -dumpbase wtf.o
-mtune=generic -march=x86-64 -mtune=generic -march=x86-64 -auxbase wtf -O1 -O1
-version -fno-trapv -fno-strict-overflow -fPIE -fstack-protector-strong
-fltrans-output-list=/tmp/cckzPbXh.ltrans.out -fwpa -fresolution=wtf.res
@/tmp/ccOxcM5h
GNU GIMPLE (GCC) version 4.9.2 20150304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.2 20150304 (prerelease), GMP version
6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.2
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version 4.9.2 20150304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.2 20150304 (prerelease), GMP version
6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.2
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COMPILER_PATH=/usr/lib/hardening-wrapper/bin/:/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/../lib/:/lib/../lib/../lib/:/usr/lib/../lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../:/lib/:/usr/lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-c' '-fno-trapv' '-fno-strict-overflow' '-mtune=generic'
'-march=x86-64' '-O1' '-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps' '-O1'
'-mtune=generic' '-march=x86-64'
'-fltrans-output-list=/tmp/cckzPbXh.ltrans.out' '-fwpa' '-fresolution=wtf.res'
[Leaving LTRANS /tmp/ccxHh0w0.args]
[Leaving LTRANS /tmp/cckzPbXh.ltrans.out]
 /usr/bin/gcc @/tmp/ccUKvuJr.args
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.9-20150304/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.2 20150304 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-fno-trapv' '-fno-strict-overflow' '-mtune=generic'
'-march=x86-64' '-O1' '-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps' '-O1'
'-mtune=generic' '-march=x86-64'
'-fltrans-output-list=/tmp/cckzPbXh.ltrans.out' '-fltrans' '-o'
'/tmp/cckzPbXh.ltrans0.ltrans.o'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/lto1 -quiet -dumpbase
cckzPbXh.ltrans0.o -mtune=generic -march=x86-64 -mtune=generic -march=x86-64
-auxbase-strip /tmp/cckzPbXh.ltrans0.ltrans.o -O1 -O1 -version -fno-trapv
-fno-strict-overflow -fPIE -fstack-protector-strong
-fltrans-output-list=/tmp/cckzPbXh.ltrans.out -fltrans @/tmp/ccNoDh2g -o
cckzPbXh.ltrans0.s
GNU GIMPLE (GCC) version 4.9.2 20150304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.2 20150304 (prerelease), GMP version
6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.2
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version 4.9.2 20150304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.2 20150304 (prerelease), GMP version
6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.2
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-c' '-fno-trapv' '-fno-strict-overflow' '-mtune=generic'
'-march=x86-64' '-O1' '-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps' '-O1'
'-mtune=generic' '-march=x86-64'
'-fltrans-output-list=/tmp/cckzPbXh.ltrans.out' '-fltrans' '-o'
'/tmp/cckzPbXh.ltrans0.ltrans.o'
 as -v --64 -o /tmp/cckzPbXh.ltrans0.ltrans.o cckzPbXh.ltrans0.s
GNU assembler version 2.25.0 (x86_64-unknown-linux-gnu) using BFD version (GNU
Binutils) 2.25.0
COMPILER_PATH=/usr/lib/hardening-wrapper/bin/:/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/../lib/:/lib/../lib/../lib/:/usr/lib/../lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/hardening-wrapper/bin/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../:/lib/:/usr/lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-c' '-fno-trapv' '-fno-strict-overflow' '-mtune=generic'
'-march=x86-64' '-O1' '-B' '/usr/lib/hardening-wrapper/bin' '-fPIE' '-D'
'_FORTIFY_SOURCE=2' '-pie' '-fstack-protector-strong' '-v' '-save-temps' '-O1'
'-mtune=generic' '-march=x86-64'
'-fltrans-output-list=/tmp/cckzPbXh.ltrans.out' '-fltrans' '-o'
'/tmp/cckzPbXh.ltrans0.ltrans.o'
[Leaving LTRANS /tmp/ccUKvuJr.args]
[Leaving LTRANS /tmp/cckzPbXh.ltrans0.o]


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug lto/66228] Compiling simple program with -flto -O1 causes mad behaviour
  2015-05-20 20:38 [Bug lto/66228] New: Compiling simple program with -flto -O1 causes mad behaviour tk@the-tk.com
@ 2015-05-21  8:55 ` rguenth at gcc dot gnu.org
  2021-08-25 20:50 ` pinskia at gcc dot gnu.org
  2021-08-25 20:55 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-05-21  8:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66228

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-21
                 CC|                            |hubicka at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.4, 4.9.2

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think this is an effective duplicate of PR61886.  With GCC 5 I get

rguenther@murzim:/tmp> gcc-5 t.i -O -flto 
/usr/include/bits/error.h: In function ‘error’:
/usr/include/bits/error.h:37:1: error: inlining failed in call to always_inline
‘error’: recursive inlining
 error (int __status, int __errnum, const char *__format, ...)
 ^
/usr/include/bits/error.h:40:5: error: called from here
     __error_noreturn (__status, __errnum, __format, __va_arg_pack ());
     ^
/usr/include/bits/error.h:37:1: error: inlining failed in call to always_inline
‘error’: recursive inlining
 error (int __status, int __errnum, const char *__format, ...)
 ^
/usr/include/bits/error.h:40:5: error: called from here
     __error_noreturn (__status, __errnum, __format, __va_arg_pack ());
     ^
...

I can reproduce the odd code generation with GCC 4.9 and 4.8.  I suspect
the issue is related to the above.
>From gcc-bugs-return-486895-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 21 08:56:26 2015
Return-Path: <gcc-bugs-return-486895-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 106963 invoked by alias); 21 May 2015 08:56:26 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 106937 invoked by uid 48); 21 May 2015 08:56:22 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/66221] [CHKP, 6 regression] lto1: error: type variant has different TYPE_ARG_TYPES
Date: Thu, 21 May 2015 08:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-66221-4-k5X7PJMvz9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66221-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66221-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01735.txt.bz2
Content-length: 428

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf221

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug lto/66228] Compiling simple program with -flto -O1 causes mad behaviour
  2015-05-20 20:38 [Bug lto/66228] New: Compiling simple program with -flto -O1 causes mad behaviour tk@the-tk.com
  2015-05-21  8:55 ` [Bug lto/66228] " rguenth at gcc dot gnu.org
@ 2021-08-25 20:50 ` pinskia at gcc dot gnu.org
  2021-08-25 20:55 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-25 20:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66228

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> I think this is an effective duplicate of PR61886.  With GCC 5 I get
> 
> rguenther@murzim:/tmp> gcc-5 t.i -O -flto 

Right you need to either use -std=gnu90 or -fgnu89-inline for GCC 5+.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug lto/66228] Compiling simple program with -flto -O1 causes mad behaviour
  2015-05-20 20:38 [Bug lto/66228] New: Compiling simple program with -flto -O1 causes mad behaviour tk@the-tk.com
  2015-05-21  8:55 ` [Bug lto/66228] " rguenth at gcc dot gnu.org
  2021-08-25 20:50 ` pinskia at gcc dot gnu.org
@ 2021-08-25 20:55 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-25 20:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66228

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |7.4
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=81004

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was fixed in GCC 7.4.0 and GCC 8+, most likely by the patch which fixed PR
81004 so it might also be fixed in GCC 6.5.0 but I did not test it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-25 20:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 20:38 [Bug lto/66228] New: Compiling simple program with -flto -O1 causes mad behaviour tk@the-tk.com
2015-05-21  8:55 ` [Bug lto/66228] " rguenth at gcc dot gnu.org
2021-08-25 20:50 ` pinskia at gcc dot gnu.org
2021-08-25 20:55 ` pinskia at gcc dot gnu.org

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).