public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/58164] New: internal compiler error: in make_decl_rtl, at varasm.c:1147
@ 2013-08-15  5:17 dirtyepic at gentoo dot org
  2013-08-15  5:25 ` [Bug tree-optimization/58164] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dirtyepic at gentoo dot org @ 2013-08-15  5:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58164

            Bug ID: 58164
           Summary: internal compiler error: in make_decl_rtl, at
                    varasm.c:1147
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dirtyepic at gentoo dot org

$ cat t.c 
int main(){ int* ptr=main; goto *&ptr; }

$ gcc-4.8.1 -O2 -v t.c
Using built-in specs.
COLLECT_GCC=gcc-4.8.1
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.8.1/work/gcc-4.8.1/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --with-cloog --disable-isl-version-check --enable-lto
--disable-nls --with-system-zlib --enable-obsolete --disable-werror
--enable-secureplt --enable-multilib --with-multilib-list=m32,m64
--disable-libmudflap --disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.1/python
--enable-checking=release --disable-libgcj --enable-libstdcxx-time
--disable-libquadmath --enable-languages=c,c++ --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-targets=all --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.8.1 p1.0, pie-0.5.6'
Thread model: posix
gcc version 4.8.1 (Gentoo 4.8.1 p1.0, pie-0.5.6) 
COLLECT_GCC_OPTIONS='-O2' '-v' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.1/cc1 -quiet -v t.c -quiet -dumpbase
t.c -mtune=generic -march=x86-64 -auxbase t -O2 -version -o /tmp/ccqyPQax.s
GNU C (Gentoo 4.8.1 p1.0, pie-0.5.6) version 4.8.1 (x86_64-pc-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/include-fixed
 /usr/include
End of search list.
GNU C (Gentoo 4.8.1 p1.0, pie-0.5.6) version 4.8.1 (x86_64-pc-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 648cea0d1e5918add0977fdeaec87cfb
t.c: In function 'main':
t.c:1:22: warning: initialization from incompatible pointer type [enabled by
default]
 int main(){ int* ptr=main; goto *&ptr; }
                      ^
t.c:1:5: internal compiler error: in make_decl_rtl, at varasm.c:1147
 int main(){ int* ptr=main; goto *&ptr; }
     ^

---
or:

$ cat t.c 
int main(){ int ptr=main; goto *&ptr; }

$ gcc-4.8.1 -O2 t.c
t.c: In function 'main':
t.c:1:21: warning: initialization makes integer from pointer without a cast
[enabled by default]
 int main(){ int ptr=main; goto *&ptr; }
                     ^
t.c:1:5: internal compiler error: in make_decl_rtl, at varasm.c:1147
 int main(){ int ptr=main; goto *&ptr; }
     ^

---

Fails since at least 4.5.4 -> 4.8 head.  Didn't test trunk.


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

* [Bug tree-optimization/58164] internal compiler error: in make_decl_rtl, at varasm.c:1147
  2013-08-15  5:17 [Bug c/58164] New: internal compiler error: in make_decl_rtl, at varasm.c:1147 dirtyepic at gentoo dot org
@ 2013-08-15  5:25 ` mpolacek at gcc dot gnu.org
  2013-08-15  5:41 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-08-15  5:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58164

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-08-15
                 CC|                            |mpolacek at gcc dot gnu.org
          Component|c                           |tree-optimization
     Ever confirmed|0                           |1
      Known to fail|                            |4.6.4, 4.7.3, 4.8.1, 4.9.0

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.  With trunk:

c.c: In function ‘main’:
c.c:1:22: warning: initialization from incompatible pointer type [enabled by
default]
 int main(){ int* ptr=main; goto *&ptr; }
                      ^
c.c:1:1: error: address taken, but ADDRESSABLE bit not set
 int main(){ int* ptr=main; goto *&ptr; }
 ^
ptr
cc1: note: in statement
goto &ptr;
c.c:1:1: internal compiler error: verify_gimple failed
0x959e09 verify_gimple_in_cfg(function*)
    /home/marek/src/gcc/gcc/tree-cfg.c:4824
0x8847e4 execute_function_todo
    /home/marek/src/gcc/gcc/passes.c:1816
0x8850dc execute_todo
    /home/marek/src/gcc/gcc/passes.c:1849
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-427874-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 15 05:36:33 2013
Return-Path: <gcc-bugs-return-427874-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3787 invoked by alias); 15 Aug 2013 05:36:33 -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 3756 invoked by uid 48); 15 Aug 2013 05:36:31 -0000
From: "alp at rsu dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug objc/57428] Objective C exceptions completely broken in gcc 4.7
Date: Thu, 15 Aug 2013 05:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: objc
X-Bugzilla-Version: 4.7.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: alp at rsu dot ru
X-Bugzilla-Status: UNCONFIRMED
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: cc
Message-ID: <bug-57428-4-8fEQRfo0mz@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57428-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57428-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: 2013-08/txt/msg00798.txt.bz2
Content-length: 2845

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW428

Alexander Pyhalov <alp at rsu dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alp at rsu dot ru

--- Comment #1 from Alexander Pyhalov <alp at rsu dot ru> ---
I see the similar crash on OpenIndiana (Solaris) with self-compiled gcc 4.7.3.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/4.7/lib/gcc/i386-pc-solaris2.11/4.7.3/lto-wrapper
Target: i386-pc-solaris2.11
Configured with:
/export/home/alp/srcs/oi-userland/components/gcc47/gcc-4.7.3/configure
CC=/usr/gcc/4.7/bin/gcc CXX=/usr/gcc/4.7/bin/g++ --prefix=/usr/gcc/4.7
--mandir=/usr/gcc/4.7/share/man --bindir=/usr/gcc/4.7/bin
--libdir=/usr/gcc/4.7/lib --sbindir=/usr/gcc/4.7/sbin
--sbindir=/usr/gcc/4.7/bin --libdir=/usr/gcc/4.7/lib
--libexecdir=/usr/gcc/4.7/lib --host i386-pc-solaris2.11 --build
i386-pc-solaris2.11 --target i386-pc-solaris2.11
--with-boot-ldflags=-R/usr/gcc/4.7/lib --enable-plugins --enable-objc-gc
--enable-languages=c,c++,fortran,lto,objc --enable-ld=no --with-as=/usr/bin/gas
--with-gnu-as --with-build-time-tools=/usr/gnu/i386-pc-solaris2.11/bin
--disable-libitm LDFLAGS=-R/usr/gcc/4.7/lib
Thread model: posix
gcc version 4.7.3 (GCC)

$ ./test
Segmentation Fault (core dumped)
$ gdb test core
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11"...
(no debugging symbols found)
Reading symbols from /usr/lib/libobjc.so.4...done.
Loaded symbols for /usr/lib/libobjc.so.4
Reading symbols from /usr/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `./test'.
Program terminated with signal 11, Segmentation fault.
[New process 90521    ]
#0  0xfef5e6ae in __objc_forward (object=0x8061620, sel=0x80617d4,
args=0x8047d20) at
/export/home/alp/srcs/oi-userland/components/gcc47/gcc-4.7.3/libobjc/sendmsg.c:1127
1127    }
(gdb) bt
#0  0xfef5e6ae in __objc_forward (object=0x8061620, sel=0x80617d4,
args=0x8047d20) at
/export/home/alp/srcs/oi-userland/components/gcc47/gcc-4.7.3/libobjc/sendmsg.c:1127
#1  0xfef5f2a1 in __objc_word_forward (rcv=0x8061620, op=0x80617d4) at
/export/home/alp/srcs/oi-userland/components/gcc47/gcc-4.7.3/libobjc/sendmsg.c:1127
#2  0x08051128 in proc ()
#3  0x0805115a in foo ()
#4  0x080511c2 in main ()


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

* [Bug tree-optimization/58164] internal compiler error: in make_decl_rtl, at varasm.c:1147
  2013-08-15  5:17 [Bug c/58164] New: internal compiler error: in make_decl_rtl, at varasm.c:1147 dirtyepic at gentoo dot org
  2013-08-15  5:25 ` [Bug tree-optimization/58164] " mpolacek at gcc dot gnu.org
@ 2013-08-15  5:41 ` mpolacek at gcc dot gnu.org
  2013-08-15 13:31 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-08-15  5:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58164

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Similar invalid testcase.

void
foo (void)
{
  int y;
  goto *&y;
}


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

* [Bug tree-optimization/58164] internal compiler error: in make_decl_rtl, at varasm.c:1147
  2013-08-15  5:17 [Bug c/58164] New: internal compiler error: in make_decl_rtl, at varasm.c:1147 dirtyepic at gentoo dot org
  2013-08-15  5:25 ` [Bug tree-optimization/58164] " mpolacek at gcc dot gnu.org
  2013-08-15  5:41 ` mpolacek at gcc dot gnu.org
@ 2013-08-15 13:31 ` jakub at gcc dot gnu.org
  2013-08-15 13:33 ` jakub at gcc dot gnu.org
  2013-08-16 13:19 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-15 13:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58164

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.8.2


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

* [Bug tree-optimization/58164] internal compiler error: in make_decl_rtl, at varasm.c:1147
  2013-08-15  5:17 [Bug c/58164] New: internal compiler error: in make_decl_rtl, at varasm.c:1147 dirtyepic at gentoo dot org
                   ` (2 preceding siblings ...)
  2013-08-15 13:31 ` jakub at gcc dot gnu.org
@ 2013-08-15 13:33 ` jakub at gcc dot gnu.org
  2013-08-16 13:19 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-15 13:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58164

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 30663
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30663&action=edit
gcc49-pr58164.patch

Untested fix.

I've first tried to make this invalid GIMPLE (i.e. allow only is_gimple_val
other than ADDR_EXPR in gimple_goto_dest), but that turned out to be much
bigger and incomplete (had to change the gimplifier, tree-cfg.c verification
and still e.g. ccp would happily propagate it into gimple_goto_dest).  So this
looks much shorter.


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

* [Bug tree-optimization/58164] internal compiler error: in make_decl_rtl, at varasm.c:1147
  2013-08-15  5:17 [Bug c/58164] New: internal compiler error: in make_decl_rtl, at varasm.c:1147 dirtyepic at gentoo dot org
                   ` (3 preceding siblings ...)
  2013-08-15 13:33 ` jakub at gcc dot gnu.org
@ 2013-08-16 13:19 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-16 13:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58164

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Aug 16 09:05:52 2013
New Revision: 201782

URL: http://gcc.gnu.org/viewcvs?rev=201782&root=gcc&view=rev
Log:
    PR tree-optimization/58164
    * gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
    walk gimple_goto_dest of GIMPLE_GOTO.

    * gcc.c-torture/compile/pr58164.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr58164.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple.c
    trunk/gcc/testsuite/ChangeLog

Author: jakub
Date: Fri Aug 16 09:06:41 2013
New Revision: 201784

URL: http://gcc.gnu.org/viewcvs?rev=201784&root=gcc&view=rev
Log:
    PR tree-optimization/58164
    * gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
    walk gimple_goto_dest of GIMPLE_GOTO.

    * gcc.c-torture/compile/pr58164.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/compile/pr58164.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/gimple.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2013-08-16 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-15  5:17 [Bug c/58164] New: internal compiler error: in make_decl_rtl, at varasm.c:1147 dirtyepic at gentoo dot org
2013-08-15  5:25 ` [Bug tree-optimization/58164] " mpolacek at gcc dot gnu.org
2013-08-15  5:41 ` mpolacek at gcc dot gnu.org
2013-08-15 13:31 ` jakub at gcc dot gnu.org
2013-08-15 13:33 ` jakub at gcc dot gnu.org
2013-08-16 13:19 ` jakub 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).