public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/31684]  New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
@ 2007-04-24 15:12 tbm at cyrius dot com
  2007-04-30 10:25 ` [Bug target/31684] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tbm at cyrius dot com @ 2007-04-24 15:12 UTC (permalink / raw)
  To: gcc-bugs

I get the following ICE with current gcc 4.3.  This goes back until at
least 4.3 20070303.  4.1 works.  I cannot test 4.2.


tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O2 mpfr-mul.c
mpfr-mul.c: In function 'mpfr_mul':
mpfr-mul.c:19: error: unrecognizable insn:
(insn:TI 69 102 68 3 (parallel [
            (set (reg:DI 136 f8)
                (asm_operands:DI ("xma.hu %0 = %2, %3, f0
        xma.l %1 = %2, %3, f0") ("=&f") 0 [
                        (reg:DI 137 f9)
                        (reg:DI 134 f6 [orig:345 D.1826 ] [345])
                    ]
                     [
                        (asm_input:DI ("f") ("") 0)
                        (asm_input:DI ("f") ("") 0)
                    ] ("mpfr-mul.c") 16))
            (set (reg/v:DI 135 f7 [orig:340 t3 ] [340])
                (asm_operands:DI ("xma.hu %0 = %2, %3, f0
        xma.l %1 = %2, %3, f0") ("=f") 1 [
                        (reg:DI 137 f9)
                        (reg:DI 134 f6 [orig:345 D.1826 ] [345])
                    ]
                     [
                        (asm_input:DI ("f") ("") 0)
                        (asm_input:DI ("f") ("") 0)
                    ] ("mpfr-mul.c") 16))
        ]) -1 (nil)
    (nil))
mpfr-mul.c:19: internal compiler error: in get_attr_first_insn, at
config/ia64/itanium2.md:1839
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O mpfr-mul.c
tbm@coconut0:~$ gcc-4.1 -c -O2 mpfr-mul.c
tbm@coconut0:~$

Testcase:

typedef struct
{
  unsigned long int *_mpfr_d;
}
__mpfr_struct;
typedef const __mpfr_struct *mpfr_srcptr;
mpfr_mul (mpfr_srcptr b, mpfr_srcptr c)
{
  unsigned long int *tmp;
  unsigned long int t1, t2, t3;
  unsigned long int __x;
  __x = tmp[1] + t1;
  tmp[1] = __x;
  __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0": "=&f" (t1), "=f"
(t2):"f" (((b)->_mpfr_d)[0]),
  "f" (((c)->_mpfr_d)[1]));
  __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0": "=&f" (tmp[3]),
"=f" (t3):"f" (((b)->_mpfr_d)[1]),
  "f" (((c)->_mpfr_d)[1]));
  tmp[3] += t1;
}


-- 
           Summary: [4.3 Regression] ICE in get_attr_first_insn, at
                    config/ia64/itanium2.md:1839 at -O2
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
@ 2007-04-30 10:25 ` pinskia at gcc dot gnu dot org
  2007-05-01  0:53 ` wilson at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-30 10:25 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   Target Milestone|---                         |4.3.0


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
  2007-04-30 10:25 ` [Bug target/31684] " pinskia at gcc dot gnu dot org
@ 2007-05-01  0:53 ` wilson at gcc dot gnu dot org
  2007-05-01  0:56 ` wilson at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: wilson at gcc dot gnu dot org @ 2007-05-01  0:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from wilson at gcc dot gnu dot org  2007-05-01 01:53 -------
It dies in recog because of an invalid extended asm insn rtl.  In an asm with 2
or more outputs, we end up with 2 or more copies of the input vector.  These
vectors must be shared.  They are not in this case.

The problem occurs in haifa-sched, in the speculative instruction support.  It
uses copy_rtx to make a copy of an insn when speculatively scheduling it. 
However, copy_rtx does not preserve the special sharing semantics of asm
operands, so the result is a corrupted insn.  There exists a special routine
copy_insn to solve this problem.  So the solution here is to just replace the
copy_rtx call with a copy_insn call.  This works on mainline for this testcase
but is not otherwise tested.


-- 

wilson at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilson at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-05-01 01:53:27
               date|                            |


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
  2007-04-30 10:25 ` [Bug target/31684] " pinskia at gcc dot gnu dot org
  2007-05-01  0:53 ` wilson at gcc dot gnu dot org
@ 2007-05-01  0:56 ` wilson at gcc dot gnu dot org
  2007-05-09 22:12 ` sje at cup dot hp dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: wilson at gcc dot gnu dot org @ 2007-05-01  0:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from wilson at gcc dot gnu dot org  2007-05-01 01:56 -------
Created an attachment (id=13466)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13466&action=view)
Replace copy_rtx call with copy_insn call.

This works on mainline for the testcase, but has not otherwise been tested.


-- 


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
                   ` (2 preceding siblings ...)
  2007-05-01  0:56 ` wilson at gcc dot gnu dot org
@ 2007-05-09 22:12 ` sje at cup dot hp dot com
  2007-06-19  6:39 ` tbm at cyrius dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sje at cup dot hp dot com @ 2007-05-09 22:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from sje at cup dot hp dot com  2007-05-09 23:12 -------
I tested the patch on IA64 HP-UX and Linux and verified that it fixed the bug
and caused no regressions.  Jim, do you want to check this patch in?


-- 


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
                   ` (3 preceding siblings ...)
  2007-05-09 22:12 ` sje at cup dot hp dot com
@ 2007-06-19  6:39 ` tbm at cyrius dot com
  2007-06-29 18:14 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tbm at cyrius dot com @ 2007-06-19  6:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tbm at cyrius dot com  2007-06-19 06:39 -------
(In reply to comment #3)
> I tested the patch on IA64 HP-UX and Linux and verified that it fixed the bug
> and caused no regressions.  Jim, do you want to check this patch in?

Given that Jim hasn't answered yet, maybe you can commit the patch yourself.


-- 


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
                   ` (4 preceding siblings ...)
  2007-06-19  6:39 ` tbm at cyrius dot com
@ 2007-06-29 18:14 ` mmitchel at gcc dot gnu dot org
  2007-07-02 17:15 ` sje at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-06-29 18:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2007-06-29 18:14 -------
This patch is OK.  Steve, please commit.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
                   ` (5 preceding siblings ...)
  2007-06-29 18:14 ` mmitchel at gcc dot gnu dot org
@ 2007-07-02 17:15 ` sje at gcc dot gnu dot org
  2007-07-02 17:16 ` sje at cup dot hp dot com
  2008-01-09 19:45 ` wilson at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: sje at gcc dot gnu dot org @ 2007-07-02 17:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sje at gcc dot gnu dot org  2007-07-02 17:15 -------
Subject: Bug 31684

Author: sje
Date: Mon Jul  2 17:15:35 2007
New Revision: 126216

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126216
Log:
        PR target/31684
        * haifa-sched.c (add_to_speculative_block): Change copy_rtx to
        copy_insn.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/haifa-sched.c


-- 


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
                   ` (6 preceding siblings ...)
  2007-07-02 17:15 ` sje at gcc dot gnu dot org
@ 2007-07-02 17:16 ` sje at cup dot hp dot com
  2008-01-09 19:45 ` wilson at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: sje at cup dot hp dot com @ 2007-07-02 17:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from sje at cup dot hp dot com  2007-07-02 17:16 -------
Patch applied.


-- 

sje at cup dot hp dot com changed:

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


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


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

* [Bug target/31684] [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2
  2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
                   ` (7 preceding siblings ...)
  2007-07-02 17:16 ` sje at cup dot hp dot com
@ 2008-01-09 19:45 ` wilson at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: wilson at gcc dot gnu dot org @ 2008-01-09 19:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from wilson at gcc dot gnu dot org  2008-01-09 19:11 -------
*** Bug 34266 has been marked as a duplicate of this bug. ***


-- 

wilson at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kate01123 at gmail dot com


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


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

end of thread, other threads:[~2008-01-09 19:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-24 15:12 [Bug target/31684] New: [4.3 Regression] ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2 tbm at cyrius dot com
2007-04-30 10:25 ` [Bug target/31684] " pinskia at gcc dot gnu dot org
2007-05-01  0:53 ` wilson at gcc dot gnu dot org
2007-05-01  0:56 ` wilson at gcc dot gnu dot org
2007-05-09 22:12 ` sje at cup dot hp dot com
2007-06-19  6:39 ` tbm at cyrius dot com
2007-06-29 18:14 ` mmitchel at gcc dot gnu dot org
2007-07-02 17:15 ` sje at gcc dot gnu dot org
2007-07-02 17:16 ` sje at cup dot hp dot com
2008-01-09 19:45 ` wilson at gcc dot gnu dot 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).