This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30093] New: vectorization of sqrt segfaults
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Dec 2006 20:03:39 -0000
- Subject: [Bug tree-optimization/30093] New: vectorization of sqrt segfaults
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Following testcase segfaults for x86_64 and i686 sse2 targets with -ffast-math:
double x[256];
void foo(void)
{
int i;
for (i=0; i<256; ++i)
x[i] = sqrt (x[i]);
}
gcc -O2 -ftree-vectorize -ffast-math vect-sqrt.c vect-sqrt.c:
In function ?foo?:
vect-sqrt.c:7: warning: incompatible implicit declaration of built-in function
?sqrt?
?
Segmentation fault
backtrace:
Analyzing compilation unit
Performing interprocedural optimizations
Assembling functions:
foo
Program received signal SIGSEGV, Segmentation fault.
0x0000003cefd72270 in strlen () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003cefd72270 in strlen () from /lib64/libc.so.6
#1 0x00000000007ff4dd in pp_base_string (pp=0xcf3d60, str=0x101040101010100
<Address 0x101040101010100 out of bounds>) at
../../gcc-svn/trunk/gcc/pretty-print.c:804
#2 0x000000000080010a in pp_base_format (pp=0xcf3d60, text=0x7fffff8a0fe0) at
../../gcc-svn/trunk/gcc/pretty-print.c:449
#3 0x00000000005976d8 in diagnostic_report_diagnostic (context=0xc3d420,
diagnostic=0x7fffff8a0fe0) at ../../gcc-svn/trunk/gcc/diagnostic.c:404
#4 0x00000000005978fe in internal_error (gmsgid=Variable "gmsgid" is not
available.
) at ../../gcc-svn/trunk/gcc/diagnostic.c:588
#5 0x00000000007d13c9 in tree_class_check_failed (node=Variable "node" is not
available.
) at ../../gcc-svn/trunk/gcc/tree.c:6409
#6 0x00000000008c103d in vectorizable_call (stmt=0x2aaaadab2c90,
bsi=0x7fffff8a1210, vec_stmt=0x7fffff8a1250) at
../../gcc-svn/trunk/gcc/tree-vect-transform.c:1717
#7 0x00000000008c7b4d in vect_transform_loop (loop_vinfo=0xd11ae0) at
../../gcc-svn/trunk/gcc/tree-vect-transform.c:3882
#8 0x00000000008b4a72 in vectorize_loops () at
../../gcc-svn/trunk/gcc/tree-vectorizer.c:2189
--
Summary: vectorization of sqrt segfaults
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ubizjak at gmail dot com
GCC build triplet: x86_64-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu, i686-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30093