Bug 23435 - [4.1/4.2 Regression] Unrecognizable insn (in extract_insn, at recog.c)
Summary: [4.1/4.2 Regression] Unrecognizable insn (in extract_insn, at recog.c)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P5 normal
Target Milestone: 4.1.0
Assignee: Kazu Hirata
URL:
Keywords: ice-on-valid-code
: 23521 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-17 08:11 UTC by Gábor Lóki
Modified: 2005-11-22 20:56 UTC (History)
4 users (show)

See Also:
Host:
Target: m68k-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-08-19 05:11:08


Attachments
Test case (53.14 KB, text/plain)
2005-08-17 08:12 UTC, Gábor Lóki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gábor Lóki 2005-08-17 08:11:32 UTC
I have the following error when compiling a file from linux kernel (attached).

Command line:
m68k-elf-gcc -w -O1 -c pr.c

Output:
pr.c: In function 'nfs_statfs':
pr.c:8757: error: unrecognizable insn:
(insn 42 40 43 3 (set (mem/s/j:DI (plus:SI (reg/f:SI 26 virtual-stack-vars)
                (const_int -64 [0xffffffc0])) [0 res.bsize+0 S8 A16])
        (zero_extend:DI (mem/s/j:SI (plus:SI (reg/v/f:SI 45 [ sb ])
                    (const_int 10 [0xa])) [0 <variable>.s_blocksize+0 S4 A16])))
-1 (nil)
    (nil))
pr.c:8757: internal compiler error: in extract_insn, at recog.c:2084


Last working version:
"2005-07-29 12:00:00 UTC"
Comment 1 Gábor Lóki 2005-08-17 08:12:30 UTC
Created attachment 9512 [details]
Test case
Comment 2 Andrew Pinski 2005-08-19 04:21:08 UTC
Reducing.
Comment 3 Andrew Pinski 2005-08-19 05:11:08 UTC
Confirmed, reduced testcase:
struct statfs {
  int f_bsize;
};
struct super_block {
  unsigned long s_blocksize;
};
struct nfs_fsinfo {
  unsigned long long bsize;
};
int statfs (struct nfs_fsinfo *);
int nfs_statfs(struct super_block *sb, struct statfs *buf)
{
  unsigned char blockbits;
  struct nfs_fsinfo res;
  statfs(&res);
  if (res.bsize == 0)
    res.bsize = sb->s_blocksize;
  buf->f_bsize = nfs_block_bits(res.bsize);
}
Comment 4 Mark Mitchell 2005-08-22 05:03:51 UTC
m68k is not a primary or secondary platform; removing target milestone.
Comment 5 Andrew Pinski 2005-08-22 23:40:55 UTC
*** Bug 23521 has been marked as a duplicate of this bug. ***
Comment 6 Kazu Hirata 2005-11-05 23:23:27 UTC
Reduced down to:

void
foo (unsigned long *a, unsigned long long *p)
{
  if (*p == 0)
    *p = *a;
}
Comment 7 Kazu Hirata 2005-11-05 23:32:31 UTC
Reduced down to:

void
foo (unsigned long *a, unsigned long long *p)
{
  *p = *a;
}
Comment 8 Kazu Hirata 2005-11-22 20:42:58 UTC
Subject: Bug 23435

Author: kazu
Date: Tue Nov 22 20:42:54 2005
New Revision: 107373

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107373
Log:
gcc/
	PR target/23435
	* m68k.md (zero_extendsidi2): Force operands[1] to a register
	if both operands[0] and operands[1] are memory.

gcc/testsuite/
	PR target/23435
	* gcc.c-torture/compile/pr23435.c: New.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr23435.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/m68k/m68k.md
    trunk/gcc/testsuite/ChangeLog

Comment 9 Kazu Hirata 2005-11-22 20:53:12 UTC
Subject: Bug 23435

Author: kazu
Date: Tue Nov 22 20:53:08 2005
New Revision: 107374

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107374
Log:
gcc/
	PR target/23435
	* m68k.md (zero_extendsidi2): Force operands[1] to a register
	if both operands[0] and operands[1] are memory.

gcc/testsuite/
	PR target/23435
	* gcc.c-torture/compile/pr23435.c: New.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/compile/pr23435.c
      - copied unchanged from r107373, trunk/gcc/testsuite/gcc.c-torture/compile/pr23435.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/m68k/m68k.md
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog

Comment 10 Kazu Hirata 2005-11-22 20:56:41 UTC
Just checked in a patch.