public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan)
@ 2011-04-04 14:46 avr at gjlay dot de
  2011-04-04 16:01 ` [Bug inline-asm/48435] " avr at gjlay dot de
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: avr at gjlay dot de @ 2011-04-04 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Assertion failure during IRA (df_scan)
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: avr@gjlay.de


This problem occurs with a file from avr-libc, the libc-like support library
for avr.

This is a regression that is present in last snapshot (SVN 171894)

http://gcc.gnu.org/ml/gcc/2011-04/msg00044.html

As previous snapshots broke the build for avr-gcc alltogether (for some other
reason), I cannot say since when the problem occured.

Updating to trunk doesn't help either.

== configuration

Reading specs from /mnt/nfs/home/georg/gnu/build/gcc-4.6-avr/gcc/specs
COLLECT_GCC=/mnt/nfs/home/georg/gnu/build/gcc-4.6-avr/gcc/xgcc
COLLECT_LTO_WRAPPER=/mnt/nfs/home/georg/gnu/build/gcc-4.6-avr/gcc/lto-wrapper
Target: avr
Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/local/gnu/install/gcc-4.6 --enable-languages=c,c++ --disable-libssp
--disable-libada --disable-nls --disable-sharedThread model: single
gcc version 4.7.0 20110404 (experimental) (GCC)

== run

avr-gcc strtod-i.c -S -Os
strtod-i.c: In function 'strtod':
strtod-i.c:834:106: error: can't find a register in class 'POINTER_REGS' while
reloading 'asm'
strtod-i.c:834:106: error: 'asm' operand has impossible constraints
strtod-i.c:482:5: error: 'asm' operand has impossible constraints
strtod-i.c:844:1: internal compiler error: in df_ref_record, at df-scan.c:2841
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The assertion sees a stack slot where REG or SUBREG is needed.


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

* [Bug inline-asm/48435] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
@ 2011-04-04 16:01 ` avr at gjlay dot de
  2011-04-04 16:26 ` avr at gjlay dot de
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: avr at gjlay dot de @ 2011-04-04 16:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Georg-Johann Lay <avr at gjlay dot de> 2011-04-04 16:00:13 UTC ---
Created attachment 23869
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23869
much simpler testcase

There is a much simpler testcase that shows the reload problems for finding a
register, at least:

long val (unsigned int addr)
{
    long val;
    asm volatile ("; " : "+z" (addr), "=r" (val));
    return val;
}


avr-gcc iasm.c -S -Os
iasm.c: In function 'val':
iasm.c:5:5: error: can't find a register in class 'POINTER_REGS' while
reloading 'asm'
iasm.c:5:5: error: 'asm' operand has impossible constraints


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

* [Bug inline-asm/48435] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
  2011-04-04 16:01 ` [Bug inline-asm/48435] " avr at gjlay dot de
@ 2011-04-04 16:26 ` avr at gjlay dot de
  2011-04-05 12:00 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: avr at gjlay dot de @ 2011-04-04 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Georg-Johann Lay <avr at gjlay dot de> 2011-04-04 16:25:08 UTC ---
Created attachment 23870
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23870
strtod-i.c procompiled source

Added precompiled source, as it got lost in original post.


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

* [Bug inline-asm/48435] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
  2011-04-04 16:01 ` [Bug inline-asm/48435] " avr at gjlay dot de
  2011-04-04 16:26 ` avr at gjlay dot de
@ 2011-04-05 12:00 ` rguenth at gcc dot gnu.org
  2011-04-06  0:20 ` [Bug inline-asm/48435] [4.7 Regression] " pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-05 12:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-05 11:57:39 UTC ---
*** Bug 48458 has been marked as a duplicate of this bug. ***


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

* [Bug inline-asm/48435] [4.7 Regression] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
                   ` (2 preceding siblings ...)
  2011-04-05 12:00 ` rguenth at gcc dot gnu.org
@ 2011-04-06  0:20 ` pinskia at gcc dot gnu.org
  2011-04-06 19:43 ` vmakarov at redhat dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-04-06  0:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, ra
   Target Milestone|---                         |4.7.0
            Summary|Assertion failure during    |[4.7 Regression] Assertion
                   |IRA (df_scan)               |failure during IRA
                   |                            |(df_scan)


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

* [Bug inline-asm/48435] [4.7 Regression] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
                   ` (3 preceding siblings ...)
  2011-04-06  0:20 ` [Bug inline-asm/48435] [4.7 Regression] " pinskia at gcc dot gnu.org
@ 2011-04-06 19:43 ` vmakarov at redhat dot com
  2011-04-07 14:03 ` ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: vmakarov at redhat dot com @ 2011-04-06 19:43 UTC (permalink / raw)
  To: gcc-bugs

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

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com

--- Comment #4 from Vladimir Makarov <vmakarov at redhat dot com> 2011-04-06 19:42:56 UTC ---
All pseudos got 0 available hard regs and therefore spills.  Something wrong
with calculation of number of available hard regs for targets which can use reg
pairs starting only on even/odd hard regs.

The fix will need changes in very sensitive part of IRA code and need some time
to write it, test, and benchmark it.  I hope it will be done at the end of
week.

Sorry for the inconvenience.


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

* [Bug inline-asm/48435] [4.7 Regression] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
                   ` (4 preceding siblings ...)
  2011-04-06 19:43 ` vmakarov at redhat dot com
@ 2011-04-07 14:03 ` ebotcazou at gcc dot gnu.org
  2011-04-08 17:48 ` vmakarov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-04-07 14:03 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.04.07 14:03:22
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org
     Ever Confirmed|0                           |1

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-04-07 14:03:22 UTC ---
> All pseudos got 0 available hard regs and therefore spills.  Something wrong
> with calculation of number of available hard regs for targets which can use 
> reg pairs starting only on even/odd hard regs.

I'm seeing this on the SPARC as well (gcc.target/sparc/combined-1.c):

  Loop 0 (parent -1, header bb0, depth 0)
    bbs: 2
    all: 0r122 1r121 2r115 3r116 4r120 5r119
    modified regnos: 115 116 119 120 121 122
    border:
    Pressure: GENERAL_OR_EXTRA_FP_REGS=8
[...]
Allocno a0r122 of EXTRA_FP_REGS(64) has 0 avail. regs obj 0 32
[...]
Allocno a1r121 of EXTRA_FP_REGS(64) has 0 avail. regs obj 0 32
[...]

      Coalescing spilled allocnos a1r121->a5r119
      Coalescing spilled allocnos a0r122->a2r115
      Slot 1 (freq,size): a0r122(2000,8) a2r115(4000,8)
      Slot 2 (freq,size): a3r116(4000,8)
      Slot 3 (freq,size): a1r121(2000,8) a5r119(2000,8)
      Slot 4 (freq,size): a4r120(2000,8)
      Assigning 120(freq=2000) a new slot 3
      Assigning 119(freq=2000) a new slot 2
      Assigning 121(freq=2000) slot 2 of 119
      Assigning 116(freq=4000) a new slot 1
      Assigning 115(freq=4000) a new slot 0
      Assigning 122(freq=2000) slot 0 of 115


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

* [Bug inline-asm/48435] [4.7 Regression] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
                   ` (5 preceding siblings ...)
  2011-04-07 14:03 ` ebotcazou at gcc dot gnu.org
@ 2011-04-08 17:48 ` vmakarov at gcc dot gnu.org
  2011-04-08 18:22 ` avr at gjlay dot de
  2011-04-16 21:34 ` gjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2011-04-08 17:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Vladimir Makarov <vmakarov at gcc dot gnu.org> 2011-04-08 17:48:27 UTC ---
Author: vmakarov
Date: Fri Apr  8 17:48:23 2011
New Revision: 172202

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172202
Log:
Fix PR # 48435 instead of 4435


Modified:
    trunk/gcc/ChangeLog


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

* [Bug inline-asm/48435] [4.7 Regression] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
                   ` (6 preceding siblings ...)
  2011-04-08 17:48 ` vmakarov at gcc dot gnu.org
@ 2011-04-08 18:22 ` avr at gjlay dot de
  2011-04-16 21:34 ` gjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: avr at gjlay dot de @ 2011-04-08 18:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Georg-Johann Lay <avr at gjlay dot de> 2011-04-08 18:22:13 UTC ---
Proper patch:

Author: vmakarov
Date: Fri Apr  8 17:17:50 2011
New Revision: 172201

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172201
Log:
2011-04-08  Vladimir Makarov  <vmakarov@redhat.com>

    PR 4435
    * ira-color.c (setup_profitable_hard_regs): Add comments.
    Don't take prohibited hard regs into account.
    (setup_conflict_profitable_regs): Rename to
    get_conflict_profitable_regs.
    (check_hard_reg_p): Check prohibited hard regs.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-color.c


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

* [Bug inline-asm/48435] [4.7 Regression] Assertion failure during IRA (df_scan)
  2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
                   ` (7 preceding siblings ...)
  2011-04-08 18:22 ` avr at gjlay dot de
@ 2011-04-16 21:34 ` gjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-04-16 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |gjl at gcc dot gnu.org
         Resolution|                            |WORKSFORME

--- Comment #8 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-04-16 21:33:51 UTC ---
Closed as resolved+works for me, i.e. for target avr.

The two test cases compile for target avr and avr-libc builds again.


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

end of thread, other threads:[~2011-04-16 21:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-04 14:46 [Bug inline-asm/48435] New: Assertion failure during IRA (df_scan) avr at gjlay dot de
2011-04-04 16:01 ` [Bug inline-asm/48435] " avr at gjlay dot de
2011-04-04 16:26 ` avr at gjlay dot de
2011-04-05 12:00 ` rguenth at gcc dot gnu.org
2011-04-06  0:20 ` [Bug inline-asm/48435] [4.7 Regression] " pinskia at gcc dot gnu.org
2011-04-06 19:43 ` vmakarov at redhat dot com
2011-04-07 14:03 ` ebotcazou at gcc dot gnu.org
2011-04-08 17:48 ` vmakarov at gcc dot gnu.org
2011-04-08 18:22 ` avr at gjlay dot de
2011-04-16 21:34 ` gjl 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).