public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c
@ 2011-04-07 13:15 yufeng at gcc dot gnu.org
  2011-05-06 11:09 ` [Bug middle-end/48493] [ICE] [ARM] " ramana at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: yufeng at gcc dot gnu.org @ 2011-04-07 13:15 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [ICE] in expand_expr_addr_expr_1, at expr.c
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: yufeng@gcc.gnu.org
                CC: jakub@gcc.gnu.org, ramana@gcc.gnu.org


The arm gcc fails in compiling the following reproducible code: 

---------------------- CODE ----------------------
typedef long long T __attribute__((may_alias, aligned (1)));

struct S
{
  _Complex float d __attribute__((aligned (8)));
};

void bar (struct S);

void
f1 (T x)
{
  struct S s;
  *(T *) ((char *) &s.d + 1) = x;
  bar (s);
}

---------------------- CUT ----------------------

The following error message will be given when the above code is compiled with
options -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon -O1
(-O1 itself should be enough to reproduce the problem):

repro.c: In function 'f1':
repro.c:14:30: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:6922
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


The test is derived from the regression test case gcc.dg/pr48335-2.c which was
added in r171855 (http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00047.html) on 1st
April. However, the compiler before the commit, and even the 4.6.1 compiler,
fails in the same way. FYI. the commit is a patch for bug 48335, in which the
'arm' target was not tested according to bug 48335, comment #6:

> Created attachment 23818 [details]
> gcc46-pr48335.patch
> 
> Updated patch, all the new tests now compile, on
> i386/x86_64/ppc/ppc64/s390/s390x.


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
@ 2011-05-06 11:09 ` ramana at gcc dot gnu.org
  2011-05-06 11:27 ` ramana at gcc dot gnu.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ramana at gcc dot gnu.org @ 2011-05-06 11:09 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.05.06 11:08:38
     Ever Confirmed|0                           |1

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-05-06 11:08:38 UTC ---
Looking at this in a gdb session . 

 0x08296944 in expand_expr_addr_expr_1 (exp=0xb7b9cd20, target=<value optimised
out>, tmode=<value optimised out>, modifier=EXPAND_NORMAL, as=0 '\000') at
/home/ramrad01/sources/fsf/trunk/gcc/expr.c:6917

      result = expand_expr (exp, target, tmode,
                modifier == EXPAND_INITIALIZER
                ? EXPAND_INITIALIZER : EXPAND_CONST_ADDRESS);

      /* If the DECL isn't in memory, then the DECL wasn't properly
         marked TREE_ADDRESSABLE, which will be either a front-end
         or a tree optimizer bug.  */
      gcc_assert (MEM_P (result));
      result = XEXP (result, 0);

(gdb) p result
$3 = (rtx) 0xb7b9d588

(gdb) pr
(concat:SC (reg/v:SF 134 [ s ])
    (reg/v:SF 135 [ s+4 ]))



That shouldn't result in a concat expression. 

Ramana


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
  2011-05-06 11:09 ` [Bug middle-end/48493] [ICE] [ARM] " ramana at gcc dot gnu.org
@ 2011-05-06 11:27 ` ramana at gcc dot gnu.org
  2011-05-17 22:38 ` michael.hope at linaro dot org
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ramana at gcc dot gnu.org @ 2011-05-06 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-05-06 11:09:45 UTC ---
(In reply to comment #1)
> Looking at this in a gdb session . 

I should say this was on trunk.

Ramana


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
  2011-05-06 11:09 ` [Bug middle-end/48493] [ICE] [ARM] " ramana at gcc dot gnu.org
  2011-05-06 11:27 ` ramana at gcc dot gnu.org
@ 2011-05-17 22:38 ` michael.hope at linaro dot org
  2011-06-21  9:06 ` mikpe at it dot uu.se
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: michael.hope at linaro dot org @ 2011-05-17 22:38 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Hope <michael.hope at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.hope at linaro dot
                   |                            |org

--- Comment #3 from Michael Hope <michael.hope at linaro dot org> 2011-05-17 22:05:00 UTC ---
I see the same thing in trunk and 4.6.0.  4.5.2 is fine.

michaelh@ursa1:~$
/scratch/michaelh/toolchains/gcc-4.6.0-armv7l-maverick-cbuild102-ursa1-cortexa9r1/bin/gcc
-O2 pr48335-2.c 
pr48335-2.c: In function 'f1':
pr48335-2.c:19:30: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:6918
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

michaelh@ursa1:~$
/scratch/michaelh/toolchains/gcc-4.6+svn173722-armv7l-maverick-cbuild114-ursa4-cortexa9r1/bin/gcc
-O2 pr48335-2.c 
pr48335-2.c: In function 'f1':
pr48335-2.c:19:30: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:6949
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

michaelh@ursa1:~$
/tools/toolchains/gcc-4.5.2-armv7l-maverick-cbuild93-ursa1-cortexa8r1/bin/gcc
-O2 -c pr48335-2.c

See also:
 http://gcc.gnu.org/ml/gcc-testresults/2011-05/msg01661.html


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-05-17 22:38 ` michael.hope at linaro dot org
@ 2011-06-21  9:06 ` mikpe at it dot uu.se
  2011-06-21 10:46 ` rguenth at gcc dot gnu.org
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2011-06-21  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #4 from Mikael Pettersson <mikpe at it dot uu.se> 2011-06-21 09:04:00 UTC ---
It's triggered by the big MEM-REF merge in r161655:

Author: rguenth
Date: Thu Jul  1 08:49:19 2010
New Revision: 161655

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161655
Log:
2010-07-01  Richard Guenther  <rguenther@suse.de>

    PR middle-end/42834
    PR middle-end/44468
    * doc/gimple.texi (is_gimple_mem_ref_addr): Document.
    * doc/generic.texi (References to storage): Document MEM_REF.
    * tree-pretty-print.c (dump_generic_node): Handle MEM_REF.
...


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-06-21  9:06 ` mikpe at it dot uu.se
@ 2011-06-21 10:46 ` rguenth at gcc dot gnu.org
  2011-06-21 11:25 ` mikpe at it dot uu.se
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-21 10:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-21 10:45:20 UTC ---
Of course it was.  The branch merge allows s to be allocated in registers
so we expand from

  MEM[(T * {ref-all})&s + 1B] = x_2(D);

and we run into the movmisalign_optab code in expand_assignment which
is supported for DImode with the commandline args.  But we probably
shouldn't try the movmisalign path when the destination is a CONCAT.

So something like the following might work (fixes the testcase, otehrwise
completely untested)

Index: expr.c
===================================================================
--- expr.c      (revision 175138)
+++ expr.c      (working copy)
@@ -4122,6 +4122,12 @@ expand_assignment (tree to, tree from, b
   rtx result;
   enum machine_mode mode;
   int align, icode;
+  enum machine_mode mode1;
+  HOST_WIDE_INT bitsize, bitpos;
+  tree offset;
+  int unsignedp;
+  int volatilep = 0;
+  tree tem;

   /* Don't crash if the lhs of the assignment was erroneous.  */
   if (TREE_CODE (to) == ERROR_MARK)
@@ -4134,9 +4140,18 @@ expand_assignment (tree to, tree from, b
   if (operand_equal_p (to, from, 0))
     return;

+  tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
+                            &unsignedp, &volatilep, true);
+
+  /* If we are going to use store_bit_field and extract_bit_field,
+     make sure to_rtx will be safe for multiple use.  */
+
+  to_rtx = expand_normal (tem);
+
   mode = TYPE_MODE (TREE_TYPE (to));
-  if ((TREE_CODE (to) == MEM_REF
-       || TREE_CODE (to) == TARGET_MEM_REF)
+  if (MEM_P (to_rtx)
+      && (TREE_CODE (to) == MEM_REF
+         || TREE_CODE (to) == TARGET_MEM_REF)
       && mode != BLKmode
       && ((align = MAX (TYPE_ALIGN (TREE_TYPE (to)),
                        get_object_alignment (to, BIGGEST_ALIGNMENT)))
@@ -4150,39 +4165,7 @@ expand_assignment (tree to, tree from, b
       reg = expand_expr (from, NULL_RTX, VOIDmode, EXPAND_NORMAL);
       reg = force_not_mem (reg);

-      if (TREE_CODE (to) == MEM_REF)
-       {
-         addr_space_t as
-             = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (to, 1))));
-         tree base = TREE_OPERAND (to, 0);
-         address_mode = targetm.addr_space.address_mode (as);
-         op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_NORMAL);
-         op0 = convert_memory_address_addr_space (address_mode, op0, as);
-         if (!integer_zerop (TREE_OPERAND (to, 1)))
-           {
-             rtx off
-                 = immed_double_int_const (mem_ref_offset (to), address_mode);
-             op0 = simplify_gen_binary (PLUS, address_mode, op0, off);
-           }
-         op0 = memory_address_addr_space (mode, op0, as);
-         mem = gen_rtx_MEM (mode, op0);
-         set_mem_attributes (mem, to, 0);
-         set_mem_addr_space (mem, as);
-       }
-      else if (TREE_CODE (to) == TARGET_MEM_REF)
-       {
-         addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (to));
-         struct mem_address addr;
-
-         get_address_description (to, &addr);
-         op0 = addr_for_mem_ref (&addr, as, true);
-         op0 = memory_address_addr_space (mode, op0, as);
-         mem = gen_rtx_MEM (mode, op0);
-         set_mem_attributes (mem, to, 0);
-         set_mem_addr_space (mem, as);
-       }
-      else
-       gcc_unreachable ();
+      mem = to_rtx;
       if (TREE_THIS_VOLATILE (to))
        MEM_VOLATILE_P (mem) = 1;

@@ -4211,21 +4194,7 @@ expand_assignment (tree to, tree from, b
          && TREE_CODE (TREE_OPERAND (to, 0)) == ADDR_EXPR)
       || TREE_CODE (TREE_TYPE (to)) == ARRAY_TYPE)
     {
-      enum machine_mode mode1;
-      HOST_WIDE_INT bitsize, bitpos;
-      tree offset;
-      int unsignedp;
-      int volatilep = 0;
-      tree tem;
-
       push_temp_slots ();
-      tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
-                                &unsignedp, &volatilep, true);
-
-      /* If we are going to use store_bit_field and extract_bit_field,
-        make sure to_rtx will be safe for multiple use.  */
-
-      to_rtx = expand_normal (tem);

       /* If the bitfield is volatile, we want to access it in the
         field's mode, not the computed mode.


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-06-21 10:46 ` rguenth at gcc dot gnu.org
@ 2011-06-21 11:25 ` mikpe at it dot uu.se
  2011-06-21 11:41 ` rguenther at suse dot de
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2011-06-21 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Mikael Pettersson <mikpe at it dot uu.se> 2011-06-21 11:24:39 UTC ---
I can do a bootstrap and regtest with Richard's patch in #c5 tomorrow, but as
my HW is armv5te I can't catch any neon-related runtime regressions.  Does
anyone else want to do the bootstrap+regtest on more modern HW?


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-06-21 11:25 ` mikpe at it dot uu.se
@ 2011-06-21 11:41 ` rguenther at suse dot de
  2011-06-24 10:00 ` mikpe at it dot uu.se
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenther at suse dot de @ 2011-06-21 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> 2011-06-21 11:40:18 UTC ---
On Tue, 21 Jun 2011, mikpe at it dot uu.se wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48493
> 
> --- Comment #6 from Mikael Pettersson <mikpe at it dot uu.se> 2011-06-21 11:24:39 UTC ---
> I can do a bootstrap and regtest with Richard's patch in #c5 tomorrow, but as
> my HW is armv5te I can't catch any neon-related runtime regressions.  Does
> anyone else want to do the bootstrap+regtest on more modern HW?

The patch probably breaks the movmisalign path


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

* [Bug middle-end/48493] [ICE] [ARM] in expand_expr_addr_expr_1, at expr.c
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-06-21 11:41 ` rguenther at suse dot de
@ 2011-06-24 10:00 ` mikpe at it dot uu.se
  2012-05-05  0:14 ` [Bug middle-end/48493] [4.6/4.7/4.8 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2011-06-24 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Mikael Pettersson <mikpe at it dot uu.se> 2011-06-24 09:59:58 UTC ---
I've now bootstrapped and regtested the patch in #c5 on top of gcc-4.6-20110610
on an armv5tel-linux-gnueabi machine.  (I couldn't get it to apply to trunk.) 
There were no build problems, it solved the test case, but there were a few
testsuite regressions:

+FAIL: gcc.dg/vect/nodump-pr23073.c (internal compiler error)
+FAIL: gcc.dg/vect/nodump-pr23073.c (test for excess errors)

/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/nodump-pr23073.c: In
function 'C':
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/nodump-pr23073.c:19:1:
error: unrecognizable insn:
(insn 7 6 8 3 (set (mem/s/c:BLK (reg/f:SI 134) [3 d+0 S16 A32])
        (unspec:V2SI [
                (reg:V2SI 135)
            ] 205))
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/nodump-pr23073.c:16 -1
     (nil))
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/nodump-pr23073.c:19:1:
internal compiler error: in extract_insn, at recog.c:2109

+FAIL: gcc.dg/vect/vect-34.c (internal compiler error)
+FAIL: gcc.dg/vect/vect-34.c (test for excess errors)

/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/vect-34.c: In function
'main1':
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/vect-34.c:31:1: error:
unrecognizable insn:
(insn 41 40 42 3 (set (mem/s/c:BLK (reg/f:SI 173) [3 s+0 S16 A32])
        (unspec:V8QI [
                (reg:V8QI 175)
            ] 205))
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/vect-34.c:20 -1
     (nil))
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/vect-34.c:31:1:
internal compiler error: in extract_insn, at recog.c:2109

+FAIL: gcc.dg/vect/bb-slp-10.c (internal compiler error)
+FAIL: gcc.dg/vect/bb-slp-10.c (test for excess errors)

/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/bb-slp-10.c: In
function 'main1':
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/bb-slp-10.c:41:1:
error: unrecognizable insn:
(insn 24 23 25 3 (set (mem/s/c:BLK (reg/f:SI 168) [2 out+0 S64 A64])
        (unspec:V2SI [
                (reg:V2SI 174)
            ] 205))
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/bb-slp-10.c:28 -1
     (nil))
/mnt/scratch/gcc-4.6-20110610/gcc/testsuite/gcc.dg/vect/bb-slp-10.c:41:1:
internal compiler error: in extract_insn, at recog.c:2109

+FAIL: gcc.target/arm/frame-pointer-1.c execution test

The runtime test in foo() fails because p4 is 0xdeadbeef rather than 4.


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

* [Bug middle-end/48493] [4.6/4.7/4.8 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-06-24 10:00 ` mikpe at it dot uu.se
@ 2012-05-05  0:14 ` pinskia at gcc dot gnu.org
  2012-05-05  0:15 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-05  0:14 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|arm-eabi                    |arm-eabi mipsisa64-*-*
            Summary|[ICE] [ARM] in              |[4.6/4.7/4.8 Regression]
                   |expand_expr_addr_expr_1, at |ice in
                   |expr.c                      |expand_expr_addr_expr_1
                   |                            |with complex types and
                   |                            |mem_ref

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-05 00:14:10 UTC ---
I ran into this same exact failure on mipsisa64-*-*.


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

* [Bug middle-end/48493] [4.6/4.7/4.8 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-05-05  0:14 ` [Bug middle-end/48493] [4.6/4.7/4.8 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref pinskia at gcc dot gnu.org
@ 2012-05-05  0:15 ` pinskia at gcc dot gnu.org
  2012-05-29 14:08 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-05  0:15 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.4


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

* [Bug middle-end/48493] [4.6/4.7/4.8 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2012-05-29 14:08 ` rguenth at gcc dot gnu.org
@ 2012-05-29 14:08 ` rguenth at gcc dot gnu.org
  2012-05-30 12:47 ` [Bug middle-end/48493] [4.6/4.7 " rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-29 14:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-29 14:07:06 UTC ---
Mine.


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

* [Bug middle-end/48493] [4.6/4.7/4.8 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2012-05-05  0:15 ` pinskia at gcc dot gnu.org
@ 2012-05-29 14:08 ` rguenth at gcc dot gnu.org
  2012-05-29 14:08 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-29 14:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug middle-end/48493] [4.6/4.7 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2012-05-29 14:08 ` rguenth at gcc dot gnu.org
@ 2012-05-30 12:47 ` rguenth at gcc dot gnu.org
  2012-05-30 17:23 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-30 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.0
            Summary|[4.6/4.7/4.8 Regression]    |[4.6/4.7 Regression] ice in
                   |ice in                      |expand_expr_addr_expr_1
                   |expand_expr_addr_expr_1     |with complex types and
                   |with complex types and      |mem_ref
                   |mem_ref                     |

--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-30 12:42:28 UTC ---
Can somebody test

Index: gcc/expr.c
===================================================================
--- gcc/expr.c  (revision 188009)
+++ gcc/expr.c  (working copy)
@@ -4593,6 +4593,7 @@ expand_assignment (tree to, tree from, b
   if ((TREE_CODE (to) == MEM_REF
        || TREE_CODE (to) == TARGET_MEM_REF)
       && mode != BLKmode
+      && !mem_ref_refers_to_non_mem_p (to)
       && ((align = get_object_or_type_alignment (to))
          < GET_MODE_ALIGNMENT (mode))
       && ((icode = optab_handler (movmisalign_optab, mode))

on arm?  That's pre-approved if it passes bootstrap & regtest (it works on
the testcase with a cross and is an obvious partial backport from trunk
r185336).

Thus, the testcase works for me on trunk.


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

* [Bug middle-end/48493] [4.6/4.7 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2012-05-30 12:47 ` [Bug middle-end/48493] [4.6/4.7 " rguenth at gcc dot gnu.org
@ 2012-05-30 17:23 ` pinskia at gcc dot gnu.org
  2012-05-30 19:14 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-30 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-30 17:05:49 UTC ---
>on arm?  That's pre-approved if it passes bootstrap & regtest 

I will try it on MIPS since I saw the exact same ICE and the exact same
"(concat:SC (reg/v:SF 134 [ s ])
    (reg/v:SF 135 [ s+4 ]))" .


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

* [Bug middle-end/48493] [4.6/4.7 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2012-05-30 17:23 ` pinskia at gcc dot gnu.org
@ 2012-05-30 19:14 ` pinskia at gcc dot gnu.org
  2012-05-31  7:37 ` mikpe at it dot uu.se
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-30 19:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-30 19:08:58 UTC ---
(In reply to comment #12)
> >on arm?  That's pre-approved if it passes bootstrap & regtest 
> 
> I will try it on MIPS since I saw the exact same ICE and the exact same
> "(concat:SC (reg/v:SF 134 [ s ])
>     (reg/v:SF 135 [ s+4 ]))" .

It fixes the bug and I saw no regressions on mips.

Thanks,
Andrew


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

* [Bug middle-end/48493] [4.6/4.7 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2012-05-30 19:14 ` pinskia at gcc dot gnu.org
@ 2012-05-31  7:37 ` mikpe at it dot uu.se
  2012-05-31 11:07 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2012-05-31  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Mikael Pettersson <mikpe at it dot uu.se> 2012-05-31 07:08:35 UTC ---
(In reply to comment #11)
> Can somebody test
...
> on arm?

Testing 4.7 + proposed fix on armv5tel-linux-gnueabi right now, expect results
in about 30 hours.


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

* [Bug middle-end/48493] [4.6/4.7 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2012-05-31  7:37 ` mikpe at it dot uu.se
@ 2012-05-31 11:07 ` rguenth at gcc dot gnu.org
  2012-05-31 11:08 ` [Bug middle-end/48493] [4.6 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-31 11:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-31 11:02:32 UTC ---
Author: rguenth
Date: Thu May 31 11:02:29 2012
New Revision: 188056

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188056
Log:
2012-05-31  Richard Guenther  <rguenther@suse.de>

    PR middle-end/48493
    * expr.c (expand_assignment): Do not use movmisalign on
    non-memory.

    * gcc.dg/torture/pr48493.c: New testcase.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr48493.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/expr.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/48493] [4.6 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2012-05-31 11:07 ` rguenth at gcc dot gnu.org
@ 2012-05-31 11:08 ` rguenth at gcc dot gnu.org
  2012-05-31 11:08 ` [Bug middle-end/48493] [4.6/4.7 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-31 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.1
            Summary|[4.6/4.7 Regression] ice in |[4.6 Regression] ice in
                   |expand_expr_addr_expr_1     |expand_expr_addr_expr_1
                   |with complex types and      |with complex types and
                   |mem_ref                     |mem_ref

--- Comment #16 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-31 11:06:39 UTC ---
Author: rguenth
Date: Thu May 31 11:06:35 2012
New Revision: 188058

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188058
Log:
2012-05-31  Richard Guenther  <rguenther@suse.de>

    PR middle-end/48493
    * gcc.dg/torture/pr48493.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr48493.c
Modified:
    trunk/gcc/testsuite/ChangeLog

--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-31 11:07:27 UTC ---
Thanks andrew for testing.  Fixed on the 4.7 branch as well.


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

* [Bug middle-end/48493] [4.6/4.7 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2012-05-31 11:08 ` [Bug middle-end/48493] [4.6 " rguenth at gcc dot gnu.org
@ 2012-05-31 11:08 ` rguenth at gcc dot gnu.org
  2012-05-31 11:13 ` [Bug middle-end/48493] [4.6 " rguenth at gcc dot gnu.org
  2013-04-12 16:25 ` jakub at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-31 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-31 11:06:39 UTC ---
Author: rguenth
Date: Thu May 31 11:06:35 2012
New Revision: 188058

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188058
Log:
2012-05-31  Richard Guenther  <rguenther@suse.de>

    PR middle-end/48493
    * gcc.dg/torture/pr48493.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr48493.c
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/48493] [4.6 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2012-05-31 11:08 ` [Bug middle-end/48493] [4.6/4.7 " rguenth at gcc dot gnu.org
@ 2012-05-31 11:13 ` rguenth at gcc dot gnu.org
  2013-04-12 16:25 ` jakub at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-31 11:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.1
            Summary|[4.6/4.7 Regression] ice in |[4.6 Regression] ice in
                   |expand_expr_addr_expr_1     |expand_expr_addr_expr_1
                   |with complex types and      |with complex types and
                   |mem_ref                     |mem_ref

--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-31 11:07:27 UTC ---
Thanks andrew for testing.  Fixed on the 4.7 branch as well.


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

* [Bug middle-end/48493] [4.6 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref
  2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2012-05-31 11:13 ` [Bug middle-end/48493] [4.6 " rguenth at gcc dot gnu.org
@ 2013-04-12 16:25 ` jakub at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:25 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.1

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:25:43 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.1.


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

end of thread, other threads:[~2013-04-12 16:25 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07 13:15 [Bug middle-end/48493] New: [ICE] in expand_expr_addr_expr_1, at expr.c yufeng at gcc dot gnu.org
2011-05-06 11:09 ` [Bug middle-end/48493] [ICE] [ARM] " ramana at gcc dot gnu.org
2011-05-06 11:27 ` ramana at gcc dot gnu.org
2011-05-17 22:38 ` michael.hope at linaro dot org
2011-06-21  9:06 ` mikpe at it dot uu.se
2011-06-21 10:46 ` rguenth at gcc dot gnu.org
2011-06-21 11:25 ` mikpe at it dot uu.se
2011-06-21 11:41 ` rguenther at suse dot de
2011-06-24 10:00 ` mikpe at it dot uu.se
2012-05-05  0:14 ` [Bug middle-end/48493] [4.6/4.7/4.8 Regression] ice in expand_expr_addr_expr_1 with complex types and mem_ref pinskia at gcc dot gnu.org
2012-05-05  0:15 ` pinskia at gcc dot gnu.org
2012-05-29 14:08 ` rguenth at gcc dot gnu.org
2012-05-29 14:08 ` rguenth at gcc dot gnu.org
2012-05-30 12:47 ` [Bug middle-end/48493] [4.6/4.7 " rguenth at gcc dot gnu.org
2012-05-30 17:23 ` pinskia at gcc dot gnu.org
2012-05-30 19:14 ` pinskia at gcc dot gnu.org
2012-05-31  7:37 ` mikpe at it dot uu.se
2012-05-31 11:07 ` rguenth at gcc dot gnu.org
2012-05-31 11:08 ` [Bug middle-end/48493] [4.6 " rguenth at gcc dot gnu.org
2012-05-31 11:08 ` [Bug middle-end/48493] [4.6/4.7 " rguenth at gcc dot gnu.org
2012-05-31 11:13 ` [Bug middle-end/48493] [4.6 " rguenth at gcc dot gnu.org
2013-04-12 16:25 ` 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).