public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst)
@ 2011-01-07 0:34 kaffeemonster at googlemail dot com
2012-04-18 23:53 ` [Bug target/47197] " wschmidt at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: kaffeemonster at googlemail dot com @ 2011-01-07 0:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197
Summary: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec
code (vec_dst)
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: treelang
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: kaffeemonster@googlemail.com
$ cat alti_crash.c
#include <altivec.h>
void func(unsigned char *buf, unsigned len)
{
vec_dst(buf, (len >= 256 ? 0 : len) | 512, 2);
}
$ powerpc-linux-gnu-gcc -maltivec -c alti_crash.c
alti_crash.c: In function 'func':
alti_crash.c:5:20: internal compiler error: in gimplify_expr, at
gimplify.c:7153
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
$ powerpc-linux-gnu-gcc --version -v
Using built-in specs.
COLLECT_GCC=/usr/i686-pc-linux-gnu/powerpc-linux-gnu/gcc-bin/4.5.2/powerpc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-linux-gnu/4.5.2/lto-wrapper
powerpc-linux-gnu-gcc (Gentoo 4.5.2 p1.0, pie-0.4.5) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Target: powerpc-linux-gnu
Configured with:
/var/tmp/portage/cross-powerpc-linux-gnu/gcc-4.5.2/work/gcc-4.5.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/powerpc-linux-gnu/gcc-bin/4.5.2
--includedir=/usr/lib/gcc/powerpc-linux-gnu/4.5.2/include
--datadir=/usr/share/gcc-data/powerpc-linux-gnu/4.5.2
--mandir=/usr/share/gcc-data/powerpc-linux-gnu/4.5.2/man
--infodir=/usr/share/gcc-data/powerpc-linux-gnu/4.5.2/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc-linux-gnu/4.5.2/include/g++-v4
--host=i686-pc-linux-gnu --target=powerpc-linux-gnu --build=i686-pc-linux-gnu
--disable-altivec --disable-fixed-point --without-ppl --without-cloog
--disable-ppl-version-check --disable-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/powerpc-linux-gnu/4.5.2/python
--enable-checking=release --disable-libgcj --enable-languages=c
--with-sysroot=/usr/powerpc-linux-gnu --disable-bootstrap --enable-__cxa_atexit
--enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.5.2 p1.0, pie-0.4.5'
Thread model: posix
gcc version 4.5.2 (Gentoo 4.5.2 p1.0, pie-0.4.5)
COLLECT_GCC_OPTIONS='-fversion' '-v'
/usr/libexec/gcc/powerpc-linux-gnu/4.5.2/cc1 -quiet -v -D__unix__
-D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux
-Asystem=unix -Asystem=posix help-dummy -D_FORTIFY_SOURCE=2 -msecure-plt -quiet
-dumpbase help-dummy -auxbase help-dummy -version -fversion -o /tmp/ccujbTX3.s
GNU C (Gentoo 4.5.2 p1.0, pie-0.4.5) version 4.5.2 (powerpc-linux-gnu)
compiled by GNU C version 4.4.4, GMP version 4.3.2, MPFR version
2.4.2-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-fversion' '-v'
/usr/libexec/gcc/powerpc-linux-gnu/as -mppc -many -V -Qy --version -o
/tmp/cccIfFZe.o /tmp/ccujbTX3.s
GNU assembler version 2.21 (powerpc-linux-gnu) using BFD version (GNU Binutils)
2.21
GNU assembler (GNU Binutils) 2.21
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `powerpc-linux-gnu'.
COMPILER_PATH=/usr/libexec/gcc/powerpc-linux-gnu/4.5.2/:/usr/libexec/gcc/powerpc-linux-gnu/4.5.2/:/usr/libexec/gcc/powerpc-linux-gnu/:/usr/lib/gcc/powerpc-linux-gnu/4.5.2/:/usr/lib/gcc/powerpc-linux-gnu/:/usr/lib/gcc/powerpc-linux-gnu/4.5.2/../../../../powerpc-linux-gnu/bin/
LIBRARY_PATH=/usr/lib/gcc/powerpc-linux-gnu/4.5.2/:/usr/lib/gcc/powerpc-linux-gnu/4.5.2/../../../../powerpc-linux-gnu/lib/:/usr/powerpc-linux-gnu/lib/:/usr/powerpc-linux-gnu/usr/lib/
COLLECT_GCC_OPTIONS='-fversion' '-v'
/usr/libexec/gcc/powerpc-linux-gnu/4.5.2/collect2
--sysroot=/usr/powerpc-linux-gnu --eh-frame-hdr -V -Qy -m elf32ppclinux
-dynamic-linker /lib/ld.so.1 --version
/usr/lib/gcc/powerpc-linux-gnu/4.5.2/../../../../powerpc-linux-gnu/lib/crt1.o
/usr/lib/gcc/powerpc-linux-gnu/4.5.2/../../../../powerpc-linux-gnu/lib/crti.o
/usr/lib/gcc/powerpc-linux-gnu/4.5.2/crtbegin.o
-L/usr/lib/gcc/powerpc-linux-gnu/4.5.2
-L/usr/lib/gcc/powerpc-linux-gnu/4.5.2/../../../../powerpc-linux-gnu/lib
-L/usr/powerpc-linux-gnu/lib -L/usr/powerpc-linux-gnu/usr/lib /tmp/cccIfFZe.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /usr/lib/gcc/powerpc-linux-gnu/4.5.2/crtend.o
/usr/lib/gcc/powerpc-linux-gnu/4.5.2/../../../../powerpc-linux-gnu/lib/crtn.o
GNU ld (GNU Binutils) 2.21
Supported emulations:
elf32ppclinux
elf32ppc
elf32ppcsim
elf64ppc
GNU ld (GNU Binutils) 2.21
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
I know, i know, It not vanilla gcc, but otherwise i can not get a vanilla
cross-compiler that fast, maybe someone can confirm...
Greetings
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/47197] ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst)
2011-01-07 0:34 [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst) kaffeemonster at googlemail dot com
@ 2012-04-18 23:53 ` wschmidt at gcc dot gnu.org
2012-04-23 21:46 ` joseph at codesourcery dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-04-18 23:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197
William J. Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-04-18
CC| |jsm28 at gcc dot gnu.org,
| |wschmidt at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-04-18 23:52:41 UTC ---
Confirmed. The ICE occurs when an unexpected tree code (C_MAYBE_CONST_EXPR) is
encountered during gimplification. From what I can tell, this should have been
scrubbed out during parsing but wasn't. The offending call to gimplify_expr ()
has the following in *expr_p:
<c_maybe_const_expr 0xfffb5e99420
type <integer_type 0xfffb5d40690 unsigned int public unsigned SI
size <integer_cst 0xfffb5c52660 constant 32>
unit size <integer_cst 0xfffb5c52680 constant 4>
align 32 symtab 0 alias set -1 canonical type 0xfffb5d40690 precision
32 min <integer_cst 0xfffb5c526a0 0> max <integer_cst 0xfffb5c52640 4294967295>
pointer_to_this <pointer_type 0xfffb5d43bb8>>
arg 1 <parm_decl 0xfffb5c804c8 len type <integer_type 0xfffb5d40690
unsigned int>
used unsigned SI file pr47197.c line 3 col 40 size <integer_cst
0xfffb5c52660 32> unit size <integer_cst 0xfffb5c52680 4>
align 32 context <function_decl 0xfffb5e39d00 func> arg-type
<integer_type 0xfffb5d40690 unsigned int>>>
The problem disappears if I change the call to __builtin_vec_dst into a normal
function call, or if I pre-compute the cond-expr rather than computing it
within the argument list.
Joseph, could you please take a look? Or let me know if you think it's not a
front end problem.
Thanks,
Bill
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/47197] ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst)
2011-01-07 0:34 [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst) kaffeemonster at googlemail dot com
2012-04-18 23:53 ` [Bug target/47197] " wschmidt at gcc dot gnu.org
@ 2012-04-23 21:46 ` joseph at codesourcery dot com
2012-04-24 1:12 ` wschmidt at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: joseph at codesourcery dot com @ 2012-04-23 21:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-04-23 21:46:23 UTC ---
On Wed, 18 Apr 2012, wschmidt at gcc dot gnu.org wrote:
> Joseph, could you please take a look? Or let me know if you think it's not a
> front end problem.
In rs6000-c.c, when you put an argument inside a CALL_EXPR or SAVE_EXPR as
part of resolving an AltiVec built-in function, you need to use
c_fully_fold because subsequent calls to c_fully_fold won't look inside
that expression. In such a case, you can do
bool maybe_const = true;
if (!c_dialect_cxx ())
expr = c_fully_fold (expr, false, &maybe_const);
before using the new value of expr (and ignore whatever value maybe_const
may have been set to).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/47197] ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst)
2011-01-07 0:34 [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst) kaffeemonster at googlemail dot com
2012-04-18 23:53 ` [Bug target/47197] " wschmidt at gcc dot gnu.org
2012-04-23 21:46 ` joseph at codesourcery dot com
@ 2012-04-24 1:12 ` wschmidt at gcc dot gnu.org
2012-04-24 13:35 ` wschmidt at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-04-24 1:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197
--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-04-24 01:12:07 UTC ---
Thanks, Joseph -- I'll get that fixed up. Appreciate the help.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/47197] ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst)
2011-01-07 0:34 [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst) kaffeemonster at googlemail dot com
` (2 preceding siblings ...)
2012-04-24 1:12 ` wschmidt at gcc dot gnu.org
@ 2012-04-24 13:35 ` wschmidt at gcc dot gnu.org
2012-04-24 15:52 ` wschmidt at gcc dot gnu.org
2012-04-24 15:54 ` wschmidt at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-04-24 13:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197
William J. Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot |wschmidt at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/47197] ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst)
2011-01-07 0:34 [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst) kaffeemonster at googlemail dot com
` (3 preceding siblings ...)
2012-04-24 13:35 ` wschmidt at gcc dot gnu.org
@ 2012-04-24 15:52 ` wschmidt at gcc dot gnu.org
2012-04-24 15:54 ` wschmidt at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-04-24 15:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197
--- Comment #4 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-04-24 15:52:04 UTC ---
Author: wschmidt
Date: Tue Apr 24 15:51:58 2012
New Revision: 186771
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186771
Log:
gcc:
2012-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/47197
* config/rs6000/rs6000-c.c (fully_fold_convert): New function.
(altivec_build_resolved_builtin): Call fully_fold_convert.
gcc/testsuite:
2012-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/47197
* gcc.target/powerpc/pr47197.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/powerpc/pr47197.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000-c.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/47197] ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst)
2011-01-07 0:34 [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst) kaffeemonster at googlemail dot com
` (4 preceding siblings ...)
2012-04-24 15:52 ` wschmidt at gcc dot gnu.org
@ 2012-04-24 15:54 ` wschmidt at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-04-24 15:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197
William J. Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #5 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-04-24 15:53:52 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-04-24 15:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07 0:34 [Bug treelang/47197] New: ICE in gimplify_expr, at gimplify.c:7153 on AltiVec code (vec_dst) kaffeemonster at googlemail dot com
2012-04-18 23:53 ` [Bug target/47197] " wschmidt at gcc dot gnu.org
2012-04-23 21:46 ` joseph at codesourcery dot com
2012-04-24 1:12 ` wschmidt at gcc dot gnu.org
2012-04-24 13:35 ` wschmidt at gcc dot gnu.org
2012-04-24 15:52 ` wschmidt at gcc dot gnu.org
2012-04-24 15:54 ` wschmidt 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).