public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26412] New: Problem with OpenMP / C
@ 2006-02-22 10:28 eloranta at jyu dot fi
2006-02-22 13:01 ` [Bug middle-end/26412] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: eloranta at jyu dot fi @ 2006-02-22 10:28 UTC (permalink / raw)
To: gcc-bugs
The following code causes gcc to crash when openmp is enabled:
bug2.c:
/*
* This program triggers an openmp bug in gcc 4.2:
Using built-in specs.
Target: powerpc-apple-darwin8.4.0
Configured with: /opt/local/var/db/dports/build/_opt_local_var_db_dports_sour
ces_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc42/work/gcc-4.2-20060
204/configure --prefix=/opt/local --enable-languages=c,c++,java,objc,fortran
--libdir=/opt/local/lib/gcc42 --includedir=/opt/local/include/gcc42 --infodir
=/opt/local/share/info --mandir=/opt/local/share/man --with-local-prefix=/opt
/local --with-system-zlib --disable-nls --program-suffix=-dp-4.2 --with-gxx-i
nclude-dir=/opt/local/include/gcc42/c++/ --with-gmp=/opt/local --with-mpfr=/o
pt/local --disable-multilib
Thread model: posix
gcc version 4.2.0 20060204 (experimental)
*
*
* To compile:
*
* gcc -fopenmp -c bug2.c
*
* The resulting error message is:
*
bug2.c: In function 'test':
bug2.c:34: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
*
* The program compiles without the -fopenmp flag.
*
* The system is MacOS X 10.4.5.
*
* Note: the program does nothing useful (it just for demonstrating the problem)
*
*/
extern double table_h[];
extern int dft_model;
void test() {
int ri;
double ph;
#pragma omp parallel for private(ri)
for (ri = 0; ri < 100; ri++) {
ph = table_h[dft_model];
}
}
bug2.i:
# 1 "bug2.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bug2.c"
# 26 "bug2.c"
extern double table_h[];
extern int dft_model;
void test() {
int ri;
double ph;
#pragma omp parallel for private(ri)
for (ri = 0; ri < 100; ri++) {
ph = table_h[dft_model];
}
}
--
Summary: Problem with OpenMP / C
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eloranta at jyu dot fi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/26412] Problem with OpenMP / C
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
@ 2006-02-22 13:01 ` pinskia at gcc dot gnu dot org
2006-02-22 13:59 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-22 13:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-22 13:01 -------
Confirmed, backtrace:
#0 0x00105ff4 in omp_add_variable (ctx=0x429008e0, decl=0x41edae70, flags=5)
at /Users/pinskia/src/gcc/local/gcc/gcc/gimplify.c:4271
#1 0x00105fc0 in omp_add_variable (ctx=0x429008e0, decl=0x41edae70, flags=5)
at /Users/pinskia/src/gcc/local/gcc/gcc/gimplify.c:4253
#2 0x001065fc in omp_notice_variable (ctx=0x578630, decl=0x429008e0,
in_code=108 'l') at /Users/pinskia/src/gcc/local/gcc/gcc/gimplify.c:4390
#3 0x001064dc in omp_notice_variable (ctx=0x578630, decl=0x429008e0,
in_code=108 'l') at /Users/pinskia/src/gcc/local/gcc/gcc/gimplify.c:4411
#4 0x00106704 in gimplify_var_or_parm_decl (expr_p=0x5) at
/Users/pinskia/src/gcc/local/gcc/gcc/gimplify.c:1599
#5 0x001148d4 in gimplify_compound_lval (expr_p=0x41ee0440, pre_p=0xbffff0cc,
post_p=0xbffff0d0, fallback=fb_rvalue) at
/Users/pinskia/src/gcc/local/gcc/gcc/gimplify.c:1660
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Status|UNCONFIRMED |NEW
Component|c |middle-end
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code, openmp
Last reconfirmed|0000-00-00 00:00:00 |2006-02-22 13:01:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/26412] Problem with OpenMP / C
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
2006-02-22 13:01 ` [Bug middle-end/26412] " pinskia at gcc dot gnu dot org
@ 2006-02-22 13:59 ` pinskia at gcc dot gnu dot org
2006-02-22 14:19 ` [Bug middle-end/26412] ICE with external arrays using OpenMP reichelt at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-22 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-02-22 13:59 -------
Also confirmed on x86_64-linux-gnu with the same backtrace.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/26412] ICE with external arrays using OpenMP
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
2006-02-22 13:01 ` [Bug middle-end/26412] " pinskia at gcc dot gnu dot org
2006-02-22 13:59 ` pinskia at gcc dot gnu dot org
@ 2006-02-22 14:19 ` reichelt at gcc dot gnu dot org
2006-02-23 18:06 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-02-22 14:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2006-02-22 14:18 -------
Even shorter testcase:
==========================
extern int table[];
void foo()
{
#pragma omp parallel
table[0];
}
==========================
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Summary|Problem with OpenMP / C |ICE with external arrays
| |using OpenMP
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/26412] ICE with external arrays using OpenMP
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
` (2 preceding siblings ...)
2006-02-22 14:19 ` [Bug middle-end/26412] ICE with external arrays using OpenMP reichelt at gcc dot gnu dot org
@ 2006-02-23 18:06 ` jakub at gcc dot gnu dot org
2006-02-24 10:26 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-23 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2006-02-23 18:06 -------
Subject: Bug 26412
Author: jakub
Date: Thu Feb 23 18:06:21 2006
New Revision: 111391
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111391
Log:
PR middle-end/26412
* gimplify.c (omp_add_variable): Guard variable size decl test with
DECL_SIZE (decl) check.
* gcc.dg/gomp/pr26412.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/gomp/pr26412.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/26412] ICE with external arrays using OpenMP
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
` (3 preceding siblings ...)
2006-02-23 18:06 ` jakub at gcc dot gnu dot org
@ 2006-02-24 10:26 ` jakub at gcc dot gnu dot org
2006-02-24 10:29 ` jakub at gcc dot gnu dot org
2006-02-27 3:43 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-24 10:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2006-02-24 10:26 -------
Fixed on the trunk.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2006-02-22 13:01:10 |2006-02-24 10:26:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/26412] ICE with external arrays using OpenMP
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
` (4 preceding siblings ...)
2006-02-24 10:26 ` jakub at gcc dot gnu dot org
@ 2006-02-24 10:29 ` jakub at gcc dot gnu dot org
2006-02-27 3:43 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-24 10:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2006-02-24 10:26 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/26412] ICE with external arrays using OpenMP
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
` (5 preceding siblings ...)
2006-02-24 10:29 ` jakub at gcc dot gnu dot org
@ 2006-02-27 3:43 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-27 3:43 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26412
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-02-27 3:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22 10:28 [Bug c/26412] New: Problem with OpenMP / C eloranta at jyu dot fi
2006-02-22 13:01 ` [Bug middle-end/26412] " pinskia at gcc dot gnu dot org
2006-02-22 13:59 ` pinskia at gcc dot gnu dot org
2006-02-22 14:19 ` [Bug middle-end/26412] ICE with external arrays using OpenMP reichelt at gcc dot gnu dot org
2006-02-23 18:06 ` jakub at gcc dot gnu dot org
2006-02-24 10:26 ` jakub at gcc dot gnu dot org
2006-02-24 10:29 ` jakub at gcc dot gnu dot org
2006-02-27 3:43 ` pinskia at gcc dot gnu dot 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).