public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm
@ 2012-11-28  9:25 jakub at gcc dot gnu.org
  2012-11-28  9:26 ` [Bug rtl-optimization/55512] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-28  9:25 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55512
           Summary: [4.8 Regression] Various LRA ICEs with inline-asm
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: error-recovery
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: vmakarov@gcc.gnu.org


#ifndef TEST
#define TEST 0
#endif

#if (TEST & 1)
#define __builtin_unreachable() do { } while (0)
#endif

#if (TEST & 2) == 0
int
foo (int x)
{
  asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3),
   "r" (x + 4), "r" (x + 5), "r" (x + 6), "r" (x + 7),
   "r" (x + 8), "r" (x + 9), "r" (x + 10), "r" (x + 11),
   "r" (x + 12), "r" (x + 13), "r" (x + 14), "r" (x + 15) : : lab);
  __builtin_unreachable ();
lab:
  return 0;
}
#endif

#if (TEST & 2)
int
bar (int x)
{
  asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3),
   "r" (x + 4), "r" (x + 5), "r" (x + 6), "r" (x + 7),
   "r" (x + 8), "r" (x + 9), "r" (x + 10), "r" (x + 11),
   "r" (x + 12), "r" (x + 13), "r" (x + 14), "r" (x + 15),
   "r" (x + 16) : : lab);
  __builtin_unreachable ();
lab:
  return 0;
}
#endif

shows 3 different ICEs on x86_64-linux with -O3.  In 4.7 I get:
for i in `seq 0 3`; do echo ===$i===; LC_ALL=C gcc -S -O2 -DTEST=$i
pr51106-3.c; done
===0===
pr51106-3.c: In function 'foo':
pr51106-3.c:13:3: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
pr51106-3.c:13:3: error: 'asm' operand has impossible constraints
===1===
pr51106-3.c: In function 'foo':
pr51106-3.c:13:3: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
pr51106-3.c:13:3: error: 'asm' operand has impossible constraints
===2===
pr51106-3.c: In function 'bar':
pr51106-3.c:27:3: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
pr51106-3.c:27:3: error: 'asm' operand has impossible constraints
===3===
pr51106-3.c: In function 'bar':
pr51106-3.c:27:3: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
pr51106-3.c:27:3: error: 'asm' operand has impossible constraints

but with the trunk:
for i in `seq 0 3`; do echo ===$i===; LC_ALL=C ./xgcc -B ./ -S -O2 -DTEST=$i
pr51106-3.c; done
===0===
pr51106-3.c: In function 'foo':
pr51106-3.c:20:1: internal compiler error: Maximum number of LRA constraint
passes is achieved (15)

 }
 ^
0x8fd167 lra_constraints(bool)
../../gcc/lra-constraints.c:3315
0x8eda2e lra(_IO_FILE*)
../../gcc/lra.c:2277
0x8a33e4 do_reload
../../gcc/ira.c:4624
0x8a35f2 rest_of_handle_reload
../../gcc/ira.c:4737
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.
===1===
pr51106-3.c: In function 'foo':
pr51106-3.c:20:1: internal compiler error: Maximum number of LRA constraint
passes is achieved (15)

 }
 ^
0x8fd167 lra_constraints(bool)
../../gcc/lra-constraints.c:3315
0x8eda2e lra(_IO_FILE*)
../../gcc/lra.c:2277
0x8a33e4 do_reload
../../gcc/ira.c:4624
0x8a35f2 rest_of_handle_reload
../../gcc/ira.c:4737
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.
===2===
pr51106-3.c: In function 'bar':
pr51106-3.c:27:3: error: 'asm' operand has impossible constraints
   asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3),
   ^
pr51106-3.c:35:1: error: unrecognizable insn:
 }
 ^
(jump_insn 22 74 37 2 (use (const_int 0 [0])) pr51106-3.c:27 -1
     (nil)
 -> 25)
pr51106-3.c:35:1: internal compiler error: in insn_default_length, at
config/i386/i386.md:1037
0x9d5ed3 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/rtl-error.c:110
0x9d5f14 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:118
0xd4887f insn_default_length(rtx_def*)
../../gcc/config/i386/i386.md:1037
0x767c92 get_attr_length_1
../../gcc/final.c:405
0x767dae get_attr_length(rtx_def*)
../../gcc/final.c:437
0xd363d8 min_insn_size
../../gcc/config/i386/i386.c:35044
0xd3661c ix86_avoid_jump_mispredicts
../../gcc/config/i386/i386.c:35140
0xd36eba ix86_reorg
../../gcc/config/i386/i386.c:35367
0x9d5bc5 rest_of_handle_machine_reorg
../../gcc/reorg.c:3944
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.
===3===
pr51106-3.c: In function 'bar':
pr51106-3.c:27:3: error: 'asm' operand has impossible constraints
   asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3),
   ^
pr51106-3.c:35:1: internal compiler error: in fixup_reorder_chain, at
cfgrtl.c:3334
 }
 ^
0x677755 fixup_reorder_chain
../../gcc/cfgrtl.c:3334
0x6789d5 cfg_layout_finalize()
../../gcc/cfgrtl.c:3811
0xf8047b rest_of_handle_reorder_blocks
../../gcc/bb-reorder.c:2225
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.


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

* [Bug rtl-optimization/55512] [4.8 Regression] Various LRA ICEs with inline-asm
  2012-11-28  9:25 [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm jakub at gcc dot gnu.org
@ 2012-11-28  9:26 ` jakub at gcc dot gnu.org
  2012-11-28  9:34 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-28  9:26 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


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

* [Bug rtl-optimization/55512] [4.8 Regression] Various LRA ICEs with inline-asm
  2012-11-28  9:25 [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm jakub at gcc dot gnu.org
  2012-11-28  9:26 ` [Bug rtl-optimization/55512] " jakub at gcc dot gnu.org
@ 2012-11-28  9:34 ` pinskia at gcc dot gnu.org
  2012-11-28  9:35 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-11-28  9:34 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-11-28 09:33:32 UTC ---
I thought this was fixed with:
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02271.html


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

* [Bug rtl-optimization/55512] [4.8 Regression] Various LRA ICEs with inline-asm
  2012-11-28  9:25 [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm jakub at gcc dot gnu.org
  2012-11-28  9:26 ` [Bug rtl-optimization/55512] " jakub at gcc dot gnu.org
  2012-11-28  9:34 ` pinskia at gcc dot gnu.org
@ 2012-11-28  9:35 ` pinskia at gcc dot gnu.org
  2012-11-28 17:43 ` vmakarov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-11-28  9:35 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-28
     Ever Confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-11-28 09:35:02 UTC ---
(In reply to comment #1)
> I thought this was fixed with:
> http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02271.html

Or rather only partly.  The unrecognizable insn part was introduced by that
change.


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

* [Bug rtl-optimization/55512] [4.8 Regression] Various LRA ICEs with inline-asm
  2012-11-28  9:25 [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-11-28  9:35 ` pinskia at gcc dot gnu.org
@ 2012-11-28 17:43 ` vmakarov at gcc dot gnu.org
  2012-11-29  8:33 ` jakub at gcc dot gnu.org
  2012-11-29  8:38 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2012-11-28 17:43 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Vladimir Makarov <vmakarov at gcc dot gnu.org> 2012-11-28 17:42:50 UTC ---
Author: vmakarov
Date: Wed Nov 28 17:42:39 2012
New Revision: 193901

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193901
Log:
2012-11-28  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/55512
    * lra-assigns.c (assign_by_spills): Assigned arbitrary hard regs
    to failed reload pseudos instead of changing asm pattern.
    * lra-constraints.c (MAX_CONSTRAINT_ITERATION_NUMBER): Increase
    value.

2012-11-28  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/55512
    * gcc.target/i386/pr55512-[1234].c: New tests.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr55512-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr55512-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr55512-3.c
    trunk/gcc/testsuite/gcc.target/i386/pr55512-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra-assigns.c
    trunk/gcc/lra-constraints.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/55512] [4.8 Regression] Various LRA ICEs with inline-asm
  2012-11-28  9:25 [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-11-28 17:43 ` vmakarov at gcc dot gnu.org
@ 2012-11-29  8:33 ` jakub at gcc dot gnu.org
  2012-11-29  8:38 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-29  8:33 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-29 08:32:41 UTC ---
Author: jakub
Date: Thu Nov 29 08:32:32 2012
New Revision: 193923

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193923
Log:
    PR rtl-optimization/55512
    * gcc.target/i386/pr55512-2.c: Remove unnecessary define.
    * gcc.target/i386/pr55512-4.c: Likewise.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/pr55512-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr55512-4.c


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

* [Bug rtl-optimization/55512] [4.8 Regression] Various LRA ICEs with inline-asm
  2012-11-28  9:25 [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-11-29  8:33 ` jakub at gcc dot gnu.org
@ 2012-11-29  8:38 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-29  8:38 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-29 08:38:31 UTC ---
Fixed.


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

end of thread, other threads:[~2012-11-29  8:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-28  9:25 [Bug rtl-optimization/55512] New: [4.8 Regression] Various LRA ICEs with inline-asm jakub at gcc dot gnu.org
2012-11-28  9:26 ` [Bug rtl-optimization/55512] " jakub at gcc dot gnu.org
2012-11-28  9:34 ` pinskia at gcc dot gnu.org
2012-11-28  9:35 ` pinskia at gcc dot gnu.org
2012-11-28 17:43 ` vmakarov at gcc dot gnu.org
2012-11-29  8:33 ` jakub at gcc dot gnu.org
2012-11-29  8:38 ` 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).