public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eloranta at jyu dot fi" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/26412] New: Problem with OpenMP / C Date: Wed, 22 Feb 2006 10:28:00 -0000 [thread overview] Message-ID: <bug-26412-12239@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2006-02-22 10:28 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-22 10:28 eloranta at jyu dot fi [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26412-12239@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).