public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "psxlover at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/61200] New: internal compiler error: Segmentation fault, assert & openmp
Date: Fri, 16 May 2014 13:28:00 -0000	[thread overview]
Message-ID: <bug-61200-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61200

            Bug ID: 61200
           Summary: internal compiler error: Segmentation fault, assert &
                    openmp
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: psxlover at hotmail dot com
                CC: jakub at gcc dot gnu.org

Created attachment 32807
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32807&action=edit
Minimal test case

When trying to compile attached file with "-fopenmp" I get a segmentation
fault.
Tried with gcc 4.4.5 (on debian squeeze), 4.8.2 (on cygwin, fedora 20 and
debian wheezy) and 4.9.0 and all of them crash.

The problem occurs when there is an assert in a parallel region containing a
variable and then you have a task with that variable as share and you access it
in any way.

The problem doesn't occur if the assert is not in a "#pragma omp parallel" or
if you change he following task to parallel, or if you remove the shared
directive from the task or finally if you don't access the variable inside the
task.

The assert call can contain anything as long as it contains the variable that
is accessed later in a task.

Here is the output of "./gcc-4.9.0/bin/gcc -v -save-temps -fopenmp
fopenmpSeg.c":


Using built-in specs.
COLLECT_GCC=./gcc-4.9.0/bin/gcc
COLLECT_LTO_WRAPPER=/home/psxlover/gcc-4.9.0/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/configure
--prefix=/home/psxlover/gcc-4.9.0 --disable-multilib
Thread model: posix
gcc version 4.9.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fopenmp' '-mtune=generic'
'-march=x86-64' '-pthread'
 /home/psxlover/gcc-4.9.0/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1 -E
-quiet -v -D_REENTRANT fopenmpSeg.c -mtune=generic -march=x86-64 -fopenmp
-fpch-preprocess -o fopenmpSeg.i
ignoring nonexistent directory
"/home/psxlover/gcc-4.9.0/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/psxlover/gcc-4.9.0/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include
 /usr/local/include
 /home/psxlover/gcc-4.9.0/include
 /home/psxlover/gcc-4.9.0/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fopenmp' '-mtune=generic'
'-march=x86-64' '-pthread'
 /home/psxlover/gcc-4.9.0/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1
-fpreprocessed fopenmpSeg.i -quiet -dumpbase fopenmpSeg.c -mtune=generic
-march=x86-64 -auxbase fopenmpSeg -version -fopenmp -o fopenmpSeg.s
GNU C (GCC) version 4.9.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 24a1e3ed1d75ecc9aae55f188f0fd7ae
fopenmpSeg.c: In function ‘main’:
fopenmpSeg.c:8:28: internal compiler error: Segmentation fault
   assert(var == 1);

                            ^
0x8e103f crash_signal
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/toplev.c:337
0x7723e1 gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/gimplify.c:8376
0x779cd0 gimple_regimplify_operands(gimple_statement_base*,
gimple_stmt_iterator*)
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/gimplify-me.c:172
0x82853b lower_omp_1
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10139
0x82853b lower_omp
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10151
0x82cca4 lower_omp_taskreg
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:9485
0x828dfe lower_omp_1
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10016
0x828dfe lower_omp
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10151
0x8292dc lower_omp_1
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10008
0x8292dc lower_omp
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10151
0x82ad6a execute_lower_omp
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10183
0x82ad6a execute
    /home/psxlover/Downloads/gcc4.9obj/../gcc-4.9.0/gcc/omp-low.c:10222
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-451763-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 16 13:31:28 2014
Return-Path: <gcc-bugs-return-451763-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18257 invoked by alias); 16 May 2014 13:31:27 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18203 invoked by uid 48); 16 May 2014 13:31:22 -0000
From: "christophe.lyon at st dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/59904] [ARM] tls-reload-1.c fails
Date: Fri, 16 May 2014 13:31:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: christophe.lyon at st dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59904-4-nN5T38ULbm@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59904-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59904-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-05/txt/msg01455.txt.bz2
Content-length: 769

https://gcc.gnu.org/bugzilla/show_bug.cgi?idY904

--- Comment #6 from christophe.lyon at st dot com ---
I have re-run the tests with trunk@210140 and older binutils (Sept 2013).

The test fails at compilation with target arm-none-linux-gnueabi, and
CFLAGS=-Os  -pie -fpie or -Os  -pie -fPIE in the following configurations:
--with-mode=arm --with-cpu=cortex-a9
--with-mode=arm --with-cpu=cortex-a9 RUNTESTFLAGS=-mthumb
--with-mode=thumb --with-cpu=cortex-a9
--with-mode=thumb --with-cpu=cortex-a9 RUNTESTFLAGS=-marm

The test compiles OK and fails at execution with
--with-mode=thumb --with-cpu=cortex-a9 RUNTESTFLAGS=-march=armv5t
(this is the ELF file I have attached)

The compiles and runs OK with
--with-mode=arm --with-cpu=cortex-a9 RUNTESTFLAGS=-march=armv5t


             reply	other threads:[~2014-05-16 13:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 13:28 psxlover at hotmail dot com [this message]
2014-05-16 15:08 ` [Bug libgomp/61200] " jakub at gcc dot gnu.org
2014-10-03  7:30 ` jakub at gcc dot gnu.org
2014-10-03  8:18 ` jakub at gcc dot gnu.org
2014-10-03  8:24 ` jakub at gcc dot gnu.org
2014-11-28 17:03 ` jakub at gcc dot gnu.org
2014-11-28 17:13 ` jakub at gcc dot gnu.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-61200-4@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: link
Be 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).