public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/59669] New: ICE: SIGSEGV with #pragma omp declare simd linear
@ 2014-01-03 21:16 zsojka at seznam dot cz
2014-01-08 12:30 ` [Bug middle-end/59669] " mpolacek at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2014-01-03 21:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59669
Bug ID: 59669
Summary: ICE: SIGSEGV with #pragma omp declare simd linear
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Created attachment 31567
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31567&action=edit
reduced testcase
Compiler output:
$ gcc -fopenmp testcase.c
==16645== Invalid read of size 2
==16645== at 0xA2AEDB: simd_clone_adjust(cgraph_node*) (tree.h:2916)
==16645== by 0xA3C2FD: (anonymous namespace)::pass_omp_simd_clone::execute()
(omp-low.c:11727)
==16645== by 0xA58859: execute_one_pass(opt_pass*) (passes.c:2226)
==16645== by 0xA590DA: execute_ipa_pass_list(opt_pass*) (passes.c:2604)
==16645== by 0x79797A: compile() (cgraphunit.c:2200)
==16645== by 0x7986A4: finalize_compilation_unit() (cgraphunit.c:2319)
==16645== by 0x6482A3: c_write_global_declarations() (c-decl.c:10400)
==16645== by 0xB4DE6C: compile_file() (toplev.c:561)
==16645== by 0xB4FDF7: toplev_main(int, char**) (toplev.c:1887)
==16645== by 0x5A439B4: (below main) (in /lib64/libc-2.16.so)
==16645== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==16645==
testcase.c: In function 'foo.simdclone.0':
testcase.c:5:1: internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ gcc -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-206310-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-206310-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 4.9.0 20140103 (experimental) (GCC)
Tested revisions:
r206310 - crash
4.8 - ignoring #pragma omp declare
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/59669] ICE: SIGSEGV with #pragma omp declare simd linear
2014-01-03 21:16 [Bug middle-end/59669] New: ICE: SIGSEGV with #pragma omp declare simd linear zsojka at seznam dot cz
@ 2014-01-08 12:30 ` mpolacek at gcc dot gnu.org
2014-01-08 15:37 ` mpolacek at gcc dot gnu.org
2014-01-08 15:38 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-08 12:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59669
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-01-08
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.9.0
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We're trying to get the default definition for 'a', but it's NULL, and then
calling has_zero_uses on it segvs. So perhaps
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -11587,7 +11587,7 @@ simd_clone_adjust (struct cgraph_node *node)
tree def = ssa_default_def (cfun, orig_arg);
gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (orig_arg))
|| POINTER_TYPE_P (TREE_TYPE (orig_arg)));
- if (!has_zero_uses (def))
+ if (def && !has_zero_uses (def))
{
iter1 = make_ssa_name (orig_arg, NULL);
iter2 = make_ssa_name (orig_arg, NULL);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/59669] ICE: SIGSEGV with #pragma omp declare simd linear
2014-01-03 21:16 [Bug middle-end/59669] New: ICE: SIGSEGV with #pragma omp declare simd linear zsojka at seznam dot cz
2014-01-08 12:30 ` [Bug middle-end/59669] " mpolacek at gcc dot gnu.org
@ 2014-01-08 15:37 ` mpolacek at gcc dot gnu.org
2014-01-08 15:38 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-08 15:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59669
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Jan 8 15:37:35 2014
New Revision: 206431
URL: http://gcc.gnu.org/viewcvs?rev=206431&root=gcc&view=rev
Log:
PR middle-end/59669
* omp-low.c (simd_clone_adjust): Don't crash if def is NULL.
testsuite/
* gcc.dg/gomp/pr59669-1.c: New test.
* gcc.dg/gomp/pr59669-2.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/gomp/pr59669-1.c
trunk/gcc/testsuite/gcc.dg/gomp/pr59669-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/omp-low.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/59669] ICE: SIGSEGV with #pragma omp declare simd linear
2014-01-03 21:16 [Bug middle-end/59669] New: ICE: SIGSEGV with #pragma omp declare simd linear zsojka at seznam dot cz
2014-01-08 12:30 ` [Bug middle-end/59669] " mpolacek at gcc dot gnu.org
2014-01-08 15:37 ` mpolacek at gcc dot gnu.org
@ 2014-01-08 15:38 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-08 15:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59669
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-08 15:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-03 21:16 [Bug middle-end/59669] New: ICE: SIGSEGV with #pragma omp declare simd linear zsojka at seznam dot cz
2014-01-08 12:30 ` [Bug middle-end/59669] " mpolacek at gcc dot gnu.org
2014-01-08 15:37 ` mpolacek at gcc dot gnu.org
2014-01-08 15:38 ` mpolacek 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).