public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop
@ 2014-03-25 11:46 doko at gcc dot gnu.org
  2014-03-25 11:57 ` [Bug target/60648] " trippels at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: doko at gcc dot gnu.org @ 2014-03-25 11:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60648

            Bug ID: 60648
           Summary: [4.8 Regression] ICE (segmentation fault) in
                    expand_binop
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

Created attachment 32445
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32445&action=edit
preprocessed source

seen with trunk r208764 on i686-linux-gnu, works on x86_64-linux-gnu, works
with the 4.8 branch, can be worked around with -O2.

$ gcc -O3 -fPIC -c vec.ii 
In file included from ../../../src/meep.hpp:23:0,
                 from ../../../src/meep_internals.hpp:18,
                 from ../../../src/vec.cpp:23:
../../../src/meep/vec.hpp: In function 'double (*
meep::derived_component_func(meep::derived_component, const meep::grid_volume&,
int&, meep::component*))(const std::complex<double>*, const meep::vec&,
void*)':
../../../src/meep/vec.hpp:325:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

Program received signal SIGSEGV, Segmentation fault.
0x084f5382 in expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*,
rtx_def*, int, optab_methods) ()
(gdb) bt
#0  0x084f5382 in expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*,
rtx_def*, int, optab_methods) ()
#1  0x083c1b6d in force_operand(rtx_def*, rtx_def*) ()
#2  0x083a6f1d in memory_address_addr_space(machine_mode, rtx_def*, unsigned
char) ()
#3  0x083c2d96 in try_tablejump(tree_node*, tree_node*, tree_node*, tree_node*,
rtx_def*, rtx_def*, int) ()
#4  0x08594c63 in ?? ()
#5  0x08596f25 in expand_case(gimple_statement_base*) ()
#6  0x0830a7a1 in ?? ()
#7  0x0830b5f8 in ?? ()
#8  0x0830d897 in ?? ()
#9  0x08506fc9 in execute_one_pass(opt_pass*) ()
#10 0x0850720f in execute_pass_list(opt_pass*) ()
#11 0x0832b4b8 in ?? ()
#12 0x0832cd6f in compile() ()
#13 0x0832d1c8 in finalize_compilation_unit() ()
#14 0x081eb3f1 in cp_write_global_declarations() ()
#15 0x085a0d25 in ?? ()
#16 0x085a28e6 in toplev_main(int, char**) ()
#17 0x081881cb in main ()


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

* [Bug target/60648] [4.8 Regression] ICE (segmentation fault) in expand_binop
  2014-03-25 11:46 [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop doko at gcc dot gnu.org
@ 2014-03-25 11:57 ` trippels at gcc dot gnu.org
  2014-03-25 13:37 ` [Bug target/60648] [4.9 " trippels at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-03-25 11:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60648

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-25
                 CC|                            |trippels at gcc dot gnu.org
   Target Milestone|---                         |4.9.0
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat test.ii
enum component
{
  Ex,
  Ez,
  Hy,
  Permeability
};
enum derived_component
{};
enum direction
{
  X,
  Y,
  Z,
  R,
  P,
  NO_DIRECTION
};
derived_component a;
component *b;
component c;
direction d;
inline direction fn1 (component p1)
{
  switch (p1)
    {
    case 0:
      return Y;
    case 1:
      return Z;
    case Permeability:
      return NO_DIRECTION;
    }
  return X;
}

inline component fn2 (direction p1)
{
  switch (p1)
    {
    case 0:
    case 1:
      return component ();
    case Z:
    case R:
      return component (1);
    case P:
      return component (3);
    }
}

void fn3 ()
{
  direction e;
  switch (0)
  case 0:
  switch (a)
    {
    case 0:
      c = Ex;
      b[1] = Hy;
    }
  e = fn1 (b[1]);
  b[1] = fn2 (e);
  d = fn1 (c);
}


markus@x4 tmp %  g++ -m32 -O2 -fPIC -c test.ii
test.ii: In function ‘void fn3()’:
test.ii:39:3: internal compiler error: Segmentation fault
   switch (p1)
   ^
Please submit a full bug report,
>From gcc-bugs-return-447388-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 25 12:00:36 2014
Return-Path: <gcc-bugs-return-447388-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23391 invoked by alias); 25 Mar 2014 12:00:35 -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 23344 invoked by uid 48); 25 Mar 2014 12:00:29 -0000
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60191] test case gfortran.dg/dynamic_dispatch_1/3.f03 fail on ARMv7
Date: Tue, 25 Mar 2014 12:00: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.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bernd.edlinger at hotmail dot de
X-Bugzilla-Status: NEW
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-60191-4-OsuUifO1FC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60191-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60191-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-03/txt/msg02257.txt.bz2
Content-length: 1073

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`191

--- Comment #9 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Hmm,

I debugged a bit and found this:

the problem starts in gfc_get_function_type
it is first called on sym->name = "make_real",
and then recursively again on the same sym.
So this is a recursive_type.

The first call returns a
build_function_type_vec (with full parameter list)

But the recursive call returns a
build_varargs_function_type_vec (with a shorter parameter list)

The problem is that these declarations are not identical:

So in the case of arm with --float-abi=hard this has
a somewhat surprising effect:

Varargs functions return a float result in r0
Normal functions returns a float result in s0.

If there were float arguments they would not be passed
on FPU-Registers for varargs functions, but because fortran
passes every in-parameter by reference that is not visible.

However that may well be different for other targets,
for instance, pass the declared parameters in registers,
and pass everything after "..." on stack.


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

* [Bug target/60648] [4.9 Regression] ICE (segmentation fault) in expand_binop
  2014-03-25 11:46 [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop doko at gcc dot gnu.org
  2014-03-25 11:57 ` [Bug target/60648] " trippels at gcc dot gnu.org
@ 2014-03-25 13:37 ` trippels at gcc dot gnu.org
  2014-03-25 14:29 ` law at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-03-25 13:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60648

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Started with r205074.


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

* [Bug target/60648] [4.9 Regression] ICE (segmentation fault) in expand_binop
  2014-03-25 11:46 [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop doko at gcc dot gnu.org
  2014-03-25 11:57 ` [Bug target/60648] " trippels at gcc dot gnu.org
  2014-03-25 13:37 ` [Bug target/60648] [4.9 " trippels at gcc dot gnu.org
@ 2014-03-25 14:29 ` law at redhat dot com
  2014-03-25 14:39 ` law at redhat dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2014-03-25 14:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60648

--- Comment #3 from Jeffrey A. Law <law at redhat dot com> ---
We're getting non-canonical as part of the index computation in do_tablejump:


(gdb) p debug_rtx (index)
(plus:SI (mult:SI (const_int 0 [0])
        (const_int 4 [0x4]))
    (label_ref:SI 0))


Obviously memory_address and its children aren't prepared to deal with the
non-canonical RTL.

Not sure what this has to do with threading, other than perhaps threading
exposing "0" as the index


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

* [Bug target/60648] [4.9 Regression] ICE (segmentation fault) in expand_binop
  2014-03-25 11:46 [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-03-25 14:29 ` law at redhat dot com
@ 2014-03-25 14:39 ` law at redhat dot com
  2014-03-28 22:21 ` law at redhat dot com
  2014-03-29 11:11 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2014-03-25 14:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60648

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
Potential fix in testing.


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

* [Bug target/60648] [4.9 Regression] ICE (segmentation fault) in expand_binop
  2014-03-25 11:46 [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-03-25 14:39 ` law at redhat dot com
@ 2014-03-28 22:21 ` law at redhat dot com
  2014-03-29 11:11 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2014-03-28 22:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60648

Jeffrey A. Law <law at redhat dot com> changed:

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

--- Comment #6 from Jeffrey A. Law <law at redhat dot com> ---
Fixed by checkin on trunk


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

* [Bug target/60648] [4.9 Regression] ICE (segmentation fault) in expand_binop
  2014-03-25 11:46 [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-03-28 22:21 ` law at redhat dot com
@ 2014-03-29 11:11 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-29 11:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60648

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Sat Mar 29 11:10:25 2014
New Revision: 208933

URL: http://gcc.gnu.org/viewcvs?rev=208933&root=gcc&view=rev
Log:
    PR target/60648
    * g++.dg/pr60648.C: Move test to...
    * g++.dg/torture/pr60648.C: ... here.  Run on all targets, remove
    dg-options, add for fpic targets dg-additional-options -fPIC.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr60648.C
      - copied, changed from r208931, trunk/gcc/testsuite/g++.dg/pr60648.C
Removed:
    trunk/gcc/testsuite/g++.dg/pr60648.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2014-03-29 11:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 11:46 [Bug target/60648] New: [4.8 Regression] ICE (segmentation fault) in expand_binop doko at gcc dot gnu.org
2014-03-25 11:57 ` [Bug target/60648] " trippels at gcc dot gnu.org
2014-03-25 13:37 ` [Bug target/60648] [4.9 " trippels at gcc dot gnu.org
2014-03-25 14:29 ` law at redhat dot com
2014-03-25 14:39 ` law at redhat dot com
2014-03-28 22:21 ` law at redhat dot com
2014-03-29 11:11 ` jakub 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).