public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L))
@ 2014-08-14 17:56 ondrej.certik at gmail dot com
  2014-08-14 18:55 ` [Bug fortran/62142] " ondrej.certik at gmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ondrej.certik at gmail dot com @ 2014-08-14 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 62142
           Summary: internal compiler error: Segmentation fault (X = X -
                    L*floor(X/L))
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ondrej.certik at gmail dot com

Created attachment 33327
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33327&action=edit
Source file to reproduce the segfault

$ cat test_segfault.f90 
program test_segfault
implicit none
integer, parameter :: dp=kind(0.d0)
real(dp) :: L
real(dp), allocatable :: X(:)
X = X - L*floor(X/L)
end program

$ gfortran -v test_segfault.f90 
Driving: gfortran -v test_segfault.f90 -l gfortran -l m -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/local/certik/bld/gcc/5att4mtprf52/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/local/certik/bld/gcc/5att4mtprf52
--enable-checking=release --enable-languages=fortran,c,c++
--with-local-prefix=/local/certik/bld/gcc/5att4mtprf52
--with-gmp=/local/certik/bld/gmp/vadkrj43wtyr
--with-mpc=/local/certik/bld/mpc/sushaq7ufe2f
--with-mpfr=/local/certik/bld/mpfr/vxwmnxjsshse
--with-cloog=/local/certik/bld/cloog/x3kd73rwqkzj
--with-isl=/local/certik/bld/isl/lfrjunwloawr --enable-clocale=gnu
--enable-__cxa_atexit --enable-shared --enable-threads=posix --disable-multilib
--libdir=/local/certik/bld/gcc/5att4mtprf52/lib
--with-stage1-ldflags='-L/local/certik/bld/cloog/x3kd73rwqkzj/lib
-Wl,-rpath=/local/certik/bld/cloog/x3kd73rwqkzj/lib
-L/local/certik/bld/gmp/vadkrj43wtyr/lib
-Wl,-rpath=/local/certik/bld/gmp/vadkrj43wtyr/lib
-L/local/certik/bld/isl/lfrjunwloawr/lib
-Wl,-rpath=/local/certik/bld/isl/lfrjunwloawr/lib
-L/local/certik/bld/mpc/sushaq7ufe2f/lib
-Wl,-rpath=/local/certik/bld/mpc/sushaq7ufe2f/lib
-L/local/certik/bld/mpfr/vxwmnxjsshse/lib
-Wl,-rpath=/local/certik/bld/mpfr/vxwmnxjsshse/lib
-L/local/certik/bld/patchelf/k3rloj265ogt/lib
-Wl,-rpath=/local/certik/bld/patchelf/k3rloj265ogt/lib
-L/local/certik/bld/zlib/3el5ccejre7b/lib
-Wl,-rpath=/local/certik/bld/zlib/3el5ccejre7b/lib'
--with-boot-ldflags='-L/local/certik/bld/cloog/x3kd73rwqkzj/lib
-Wl,-rpath=/local/certik/bld/cloog/x3kd73rwqkzj/lib
-L/local/certik/bld/gmp/vadkrj43wtyr/lib
-Wl,-rpath=/local/certik/bld/gmp/vadkrj43wtyr/lib
-L/local/certik/bld/isl/lfrjunwloawr/lib
-Wl,-rpath=/local/certik/bld/isl/lfrjunwloawr/lib
-L/local/certik/bld/mpc/sushaq7ufe2f/lib
-Wl,-rpath=/local/certik/bld/mpc/sushaq7ufe2f/lib
-L/local/certik/bld/mpfr/vxwmnxjsshse/lib
-Wl,-rpath=/local/certik/bld/mpfr/vxwmnxjsshse/lib
-L/local/certik/bld/patchelf/k3rloj265ogt/lib
-Wl,-rpath=/local/certik/bld/patchelf/k3rloj265ogt/lib
-L/local/certik/bld/zlib/3el5ccejre7b/lib
-Wl,-rpath=/local/certik/bld/zlib/3el5ccejre7b/lib'
Thread model: posix
gcc version 4.9.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

/local/certik/bld/gcc/5att4mtprf52/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/f951
test_segfault.f90 -quiet -dumpbase test_segfault.f90 -mtune=generic
-march=x86-64 -auxbase test_segfault -version -fintrinsic-modules-path
/local/certik/bld/gcc/5att4mtprf52/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/finclude
-o /tmp/ccliCcO4.s
GNU Fortran (GCC) version 4.9.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.1, GMP version 5.1.3, MPFR version 3.1.2, MPC
version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (GCC) version 4.9.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.1, GMP version 5.1.3, MPFR version 3.1.2, MPC
version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
test_segfault.f90: In function ‘test_segfault’:
test_segfault.f90:6:0: internal compiler error: Segmentation fault
 X = X - L*floor(X/L)
 ^
0x90f44f crash_signal
    ../.././gcc/toplev.c:337
0x604e0d is_runtime_conformable
    ../.././gcc/fortran/trans-expr.c:7856
0x604e1b is_runtime_conformable
    ../.././gcc/fortran/trans-expr.c:7856
0x611aa4 gfc_trans_assignment_1
    ../.././gcc/fortran/trans-expr.c:8117
0x5e3fc5 trans_code
    ../.././gcc/fortran/trans.c:1639
0x6033bb gfc_generate_function_code(gfc_namespace*)
    ../.././gcc/fortran/trans-decl.c:5653
0x5a2f80 translate_all_program_units
    ../.././gcc/fortran/parse.c:4953
0x5a2f80 gfc_parse_file()
    ../.././gcc/fortran/parse.c:5150
0x5e0025 gfc_be_parse_file
    ../.././gcc/fortran/f95-lang.c:212
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.


When I execute "gfortran -v -save-temps  test_segfault.f90", it doesn't produce
preprocessed sources, I assume the segfault happens in the parser. I have
isolated the segfault, it happens in a large codebase and prevents its
compilation (the array is allocated in our code, the above is the simplest code
to reproduce the problem).

This is my first bug report, please let me know if you need further
information.
>From gcc-bugs-return-458492-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 14 18:10:54 2014
Return-Path: <gcc-bugs-return-458492-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32441 invoked by alias); 14 Aug 2014 18:10:53 -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 32404 invoked by uid 55); 14 Aug 2014 18:10:48 -0000
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/62071] [4.10 Regression] ICE: in before_dom_children, at tree-ssa-pre.c:4411
Date: Thu, 14 Aug 2014 18:10:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hubicka at ucw dot cz
X-Bugzilla-Status: RESOLVED
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-62071-4-zzvOgC2j2h@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-62071-4@http.gcc.gnu.org/bugzilla/>
References: <bug-62071-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-08/txt/msg00989.txt.bz2
Content-length: 1836

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

--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> ---
Hi,
There are two issues seen with the testcase.  First is that ipa-devirt misses
the ctor call that can be easily fixed by:
Index: ipa-devirt.c
==================================================================--- ipa-devirt.c        (revision 213969)
+++ ipa-devirt.c        (working copy)
@@ -2663,6 +2663,8 @@
                          * BITS_PER_UNIT;
                op = TREE_OPERAND (op, 0);
              }
+           else if (DECL_P (op))
+             ;
            else
              {
                 tci->speculative = true;

I am testing this patch.

However even with this change we won't devirtualize because we believe that we
can not reffer to the virtual method.
The node is:
(gdb) p snode->dump (stderr)
_ZNK1A5m_fn1Ev/3 (virtual SnmpSyntax* A::m_fn1() const) @0x7ffff6dad8a0
  Type: function definition analyzed
  Visibility: external public weak comdat comdat_group:_ZNK1A5m_fn1Ev one_only
virtual
  Address is taken.
  References:
  Referring: _ZTV1A/12 (addr)
  Availability: available
  First run: 0
  Function flags: body
  Called by:
  Calls:

I wonder what we should do with both external and comdat here.  Jason, can we
devirtualize?
The constructor is keyed to other compilation unit here, but we are provided
with a body
that we will never use (modulo the tree-ssa-pre bug that brings the reference
into code).

I can imagine implementing logic to make us to devirtualize only when inlining
and never introduce
direct refernece otherwise, but it would be quite work - so far we always need
the intermediate
reference before inlining. (Basically we will need to make ipa-devirt to
produce direct call and
revert if inliner fails to inline the function at the end of IPA queue).

Honza


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
@ 2014-08-14 18:55 ` ondrej.certik at gmail dot com
  2014-08-14 19:17 ` ondrej.certik at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ondrej.certik at gmail dot com @ 2014-08-14 18:55 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 6493 bytes --]

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

--- Comment #1 from Ondřej Čertík <ondrej.certik at gmail dot com> ---
One can actually isolate it even further (the same stacktrace):

program test_segfault
implicit none
real, allocatable :: X(:)
X = floor(X)
end program
>From gcc-bugs-return-458499-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 14 19:03:23 2014
Return-Path: <gcc-bugs-return-458499-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16292 invoked by alias); 14 Aug 2014 19:03:22 -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 16233 invoked by uid 48); 14 Aug 2014 19:03:15 -0000
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/62142] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
Date: Thu, 14 Aug 2014 19:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kargl at gcc dot gnu.org
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: cc
Message-ID: <bug-62142-4-JwKog83Cvx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-62142-4@http.gcc.gnu.org/bugzilla/>
References: <bug-62142-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-08/txt/msg00996.txt.bz2
Content-length: 2049

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to Ondřej Čertík from comment #0)
> Created attachment 33327 [details]
> Source file to reproduce the segfault
> 
> $ cat test_segfault.f90 
> program test_segfault
> implicit none
> integer, parameter :: dp=kind(0.d0)
> real(dp) :: L
> real(dp), allocatable :: X(:)
> X = X - L*floor(X/L)
> end program
> 

(snip)

> When I execute "gfortran -v -save-temps  test_segfault.f90", it doesn't
> produce preprocessed sources, I assume the segfault happens in the parser. I
> have isolated the segfault, it happens in a large codebase and prevents its
> compilation (the array is allocated in our code, the above is the simplest
> code to reproduce the problem).
> 
> This is my first bug report, please let me know if you need further
> information.

For such a short program, we don't necessarily need -save-temps.
Note, your reduce test case is nonconforming code because it 
uses L and X in a RHS expression without being defined.  With the
small change

program test_segfault
implicit none
integer, parameter :: dp=kind(0.d0)
real(dp) :: L
real(dp), allocatable :: X(:)
L = 42
X = [1, 2]
X = X - L*floor(X/L)
end program

the code is now conforming and it still exhibits the bug.

I suspect that the bug is due to a combination of -frealloc-lhs
and that floor is generated as inline code.  With -frealloc-lhs,
I get the same ICE that you find.  With -fno-realloc-lhs, I get
a compiled executable but it segfaults at runtime because x = [1,2]
obviously won't work.  If I add an allocate(x(2)) prior to 
x = [1,2], then -fno-realloc-lhs produced executable runs as
expected.  So, as a workaround explicitly allocate memory and
use -fno-realloc-lhs.
>From gcc-bugs-return-458500-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 14 19:07:29 2014
Return-Path: <gcc-bugs-return-458500-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19719 invoked by alias); 14 Aug 2014 19:07:28 -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 19669 invoked by uid 48); 14 Aug 2014 19:07:23 -0000
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/62091] [5 Regression] ice in before_dom_children
Date: Thu, 14 Aug 2014 19:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hubicka at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-62091-4-VClAWWrp7N@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-62091-4@http.gcc.gnu.org/bugzilla/>
References: <bug-62091-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-08/txt/msg00997.txt.bz2
Content-length: 538

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 33329
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3329&actioníit
Path I am testing

The disagreemeng actually turned out to be subtle bug in tree-ssa-alias.c where
function_entry_reached was incorrectly incorrectly initialized to false during
recursive walk :(

I am testing the following patch that makes us to not devirtualize in this
case. We still ought to solve the visibility issues


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
  2014-08-14 18:55 ` [Bug fortran/62142] " ondrej.certik at gmail dot com
@ 2014-08-14 19:17 ` ondrej.certik at gmail dot com
  2014-08-15  8:42 ` [Bug fortran/62142] [4.9/5 Regression] " dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ondrej.certik at gmail dot com @ 2014-08-14 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Ondřej Čertík <ondrej.certik at gmail dot com> ---
Thanks Steve for the quick reply! I tried "-fno-realloc-lhs" and it fixes the
problem for us (we always allocate arrays explicitly).
>From gcc-bugs-return-458502-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 14 19:25:46 2014
Return-Path: <gcc-bugs-return-458502-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4218 invoked by alias); 14 Aug 2014 19:25:45 -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 4184 invoked by uid 48); 14 Aug 2014 19:25:42 -0000
From: "charlet at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/40986] [4.8/4.9/5 regression] Assert_Failure sinfo.adb:360, error detected at a-unccon.ads:23:27
Date: Thu, 14 Aug 2014 19:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ada
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: charlet at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc version resolution
Message-ID: <bug-40986-4-ARmxfuSJQW@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-40986-4@http.gcc.gnu.org/bugzilla/>
References: <bug-40986-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-08/txt/msg00999.txt.bz2
Content-length: 566

https://gcc.gnu.org/bugzilla/show_bug.cgi?id@986

Arnaud Charlet <charlet at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |charlet at gcc dot gnu.org
            Version|4.4.1                       |4.8.2
         Resolution|---                         |FIXED

--- Comment #20 from Arnaud Charlet <charlet at gcc dot gnu.org> ---
Closing then


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
  2014-08-14 18:55 ` [Bug fortran/62142] " ondrej.certik at gmail dot com
  2014-08-14 19:17 ` ondrej.certik at gmail dot com
@ 2014-08-15  8:42 ` dominiq at lps dot ens.fr
  2014-08-15  8:52 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-08-15  8:42 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.8.3
           Keywords|                            |ice-on-invalid-code,
                   |                            |ice-on-valid-code
   Last reconfirmed|                            |2014-08-15
                 CC|                            |tkoenig at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|internal compiler error:    |[4.9/5 Regression] internal
                   |Segmentation fault (X = X - |compiler error:
                   |L*floor(X/L))               |Segmentation fault (X = X -
                   |                            |L*floor(X/L))
      Known to fail|                            |4.9.1, 5.0

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The codes in comments 0, 1, and 2 compile with gfortran 4.8, but not with 4.9
nor trunk (5.0). Revision r201916 (2013-08-22) is OK, r202111 (2013-08-30)
gives the ICE, likely r202070.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
                   ` (2 preceding siblings ...)
  2014-08-15  8:42 ` [Bug fortran/62142] [4.9/5 Regression] " dominiq at lps dot ens.fr
@ 2014-08-15  8:52 ` dominiq at lps dot ens.fr
  2014-08-15 10:02 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-08-15  8:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I also get an ICE for

 X = ceiling(X)

and

 X = aint(X)

but not if I replace floor with sin or real.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
                   ` (3 preceding siblings ...)
  2014-08-15  8:52 ` dominiq at lps dot ens.fr
@ 2014-08-15 10:02 ` rguenth at gcc dot gnu.org
  2014-08-15 12:39 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-15 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
                   ` (4 preceding siblings ...)
  2014-08-15 10:02 ` rguenth at gcc dot gnu.org
@ 2014-08-15 12:39 ` jakub at gcc dot gnu.org
  2014-08-15 20:34 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-08-15 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed, this regressed with r202070.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
                   ` (5 preceding siblings ...)
  2014-08-15 12:39 ` jakub at gcc dot gnu.org
@ 2014-08-15 20:34 ` tkoenig at gcc dot gnu.org
  2014-08-15 21:20 ` tkoenig at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2014-08-15 20:34 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |tkoenig at gcc dot gnu.org

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
A rather obvious fix:

Index: trans-expr.c
===================================================================
--- trans-expr.c        (Revision 213778)
+++ trans-expr.c        (Arbeitskopie)
@@ -7895,7 +7895,7 @@
          for (a = expr2->value.function.actual; a != NULL; a = a->next)        
            {                                                                   
              e1 = a->expr;                                                     
-             if (e1->rank > 0 && !is_runtime_conformable (expr1, e1))
+             if (e1 && e1->rank > 0 && !is_runtime_conformable (expr1, e1))
                return false;
            }
          return true;
@@ -7906,7 +7906,7 @@
          for (a = expr2->value.function.actual; a != NULL; a = a->next)
            {
              e1 = a->expr;
-             if (e1->rank > 0 && !is_runtime_conformable (expr1, e1))
+             if (e1 && e1->rank > 0 && !is_runtime_conformable (expr1, e1))
                return false;
            }
          return true;


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
                   ` (6 preceding siblings ...)
  2014-08-15 20:34 ` tkoenig at gcc dot gnu.org
@ 2014-08-15 21:20 ` tkoenig at gcc dot gnu.org
  2014-08-16  9:45 ` tkoenig at gcc dot gnu.org
  2014-08-16  9:46 ` tkoenig at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2014-08-15 21:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Author: tkoenig
Date: Fri Aug 15 21:19:33 2014
New Revision: 214043

URL: https://gcc.gnu.org/viewcvs?rev=214043&root=gcc&view=rev
Log:
2014-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/62142
    * trans-expr.c (is_runtime_conformable):  Add NULL pointer checks.

2014-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/62142
    * gfortran.dg/realloc_on_assign_24.f90:  New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
                   ` (7 preceding siblings ...)
  2014-08-15 21:20 ` tkoenig at gcc dot gnu.org
@ 2014-08-16  9:45 ` tkoenig at gcc dot gnu.org
  2014-08-16  9:46 ` tkoenig at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2014-08-16  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Author: tkoenig
Date: Sat Aug 16 09:45:02 2014
New Revision: 214061

URL: https://gcc.gnu.org/viewcvs?rev=214061&root=gcc&view=rev
Log:
2014-08-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

    Backport from trunk
    PR fortran/62142
    * trans-expr.c (is_runtime_conformable):  Add NULL pointer checks.

2014-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

    Backport from trunk
    PR fortran/62142
    * gfortran.dg/realloc_on_assign_24.f90:  New test.


Added:
    branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90
Modified:
    branches/gcc-4_9-branch/gcc/fortran/ChangeLog
    branches/gcc-4_9-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))
  2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
                   ` (8 preceding siblings ...)
  2014-08-16  9:45 ` tkoenig at gcc dot gnu.org
@ 2014-08-16  9:46 ` tkoenig at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2014-08-16  9:46 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Fixed on all affected branches, closing.

Thanks for the bug report!


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-08-16  9:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14 17:56 [Bug fortran/62142] New: internal compiler error: Segmentation fault (X = X - L*floor(X/L)) ondrej.certik at gmail dot com
2014-08-14 18:55 ` [Bug fortran/62142] " ondrej.certik at gmail dot com
2014-08-14 19:17 ` ondrej.certik at gmail dot com
2014-08-15  8:42 ` [Bug fortran/62142] [4.9/5 Regression] " dominiq at lps dot ens.fr
2014-08-15  8:52 ` dominiq at lps dot ens.fr
2014-08-15 10:02 ` rguenth at gcc dot gnu.org
2014-08-15 12:39 ` jakub at gcc dot gnu.org
2014-08-15 20:34 ` tkoenig at gcc dot gnu.org
2014-08-15 21:20 ` tkoenig at gcc dot gnu.org
2014-08-16  9:45 ` tkoenig at gcc dot gnu.org
2014-08-16  9:46 ` tkoenig 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).