User account creation filtered due to spam.

Bug 15202 - [3.4 only] ICE in reload_cse_simplify_operands, at postreload.c
Summary: [3.4 only] ICE in reload_cse_simplify_operands, at postreload.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.3
: P1 normal
Target Milestone: 3.3.5
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-04-29 13:54 UTC by Martin
Modified: 2004-09-09 23:40 UTC (History)
3 users (show)

See Also:
Host:
Target: hppa2.0w-hp-hpux11.00
Build:
Known to work: 4.0 3.4.1 3.3.5
Known to fail: 3.4.0
Last reconfirmed: 2004-05-14 12:40:53


Attachments
preprocessed source from motion_est.i.bz2 (35.43 KB, application/octet-stream)
2004-04-30 06:27 UTC, Martin
Details
reduced testcase (45 lines) (529 bytes, text/plain)
2004-05-01 08:08 UTC, Dara Hazeghi
Details
Fix for 3.3 branch (1003 bytes, patch)
2004-06-22 01:55 UTC, John David Anglin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2004-04-29 13:54:27 UTC
Hi,

I tried to compile the new MPlayer-1.0pre4 on hpux 11.00,
but this fails with a gcc error message:

error with gcc-3.3.3:

/usr/local/pa20_32/bin/gcc -I../libvo/ -I../../libvo -O4   -pipe -ffast-math -
fomit-frame-pointer -D
HPUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include -
I/usr/local/include/gtk-1.2 -I
/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -DHAVE_AV_CONFIG_H -
I.. -D_FILE_OFFSET_BIT
S=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o motion_est.o motion_est.c
motion_est.c: In function `ff_estimate_p_frame_motion':
motion_est.c:1369: error: insn does not satisfy its constraints:
(insn 33808 33807 31116 771 00000000 (set (reg:SI 22 %r22)
        (reg:SI 88 SAR [19146])) 37 {*pa.md:2265} (nil)
    (nil))
motion_est.c:1369: internal compiler error: in reload_cse_simplify_operands, at 
reload1.c:8353
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


error message with gcc-3.4:

/usr/local/gcc-3.4.0_32/pa20_32/bin/gcc -I../libvo/ -I../../libvo -O4   -pipe -
ffast-math -fomit-fra
me-pointer -DHPUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -
I/usr/local/include -I/usr/local/inclu
de/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -
DHAVE_AV_CONFIG_H -I.. -D_FI
LE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o motion_est.o 
motion_est.c
motion_est_template.c: In function `hpel_motion_search':
motion_est_template.c:220: error: insn does not satisfy its constraints:
(insn 22118 22117 21385 69 (set (reg:SI 21 %r21)
        (reg:SI 88 SAR [829])) 37 {*pa.md:2265} (nil)
    (nil))
motion_est_template.c:220: internal compiler error: in 
reload_cse_simplify_operands, at postreload.c
:378
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


# /usr/local/pa20_32/bin/gcc -v
Reading specs from /usr/local/pa20_32/lib/gcc-lib/hppa2.0w-hp-
hpux11.00/3.3.3/specs
Configured with: ../src/configure --enable-languages=c,c++ --
prefix=/usr/local/pa20_32 --with-local-
prefix=/usr/local/pa20_32 --with-gnu-as --with-as=/usr/local/pa20_32/bin/as --
with-ld=/usr/ccs/bin/ld
 --disable-shared --disable-nls
Thread model: single
gcc version 3.3.3


# /usr/local/gcc-3.4.0_32/pa20_32/bin/gcc -v
Reading specs from /usr/local/gcc-3.4.0_32/pa20_32/lib/gcc/hppa2.0w-hp-
hpux11.00/3.4.0/specs
Configured with: ../src/configure --enable-languages=c,c++ --
prefix=/usr/local/pa20_32 --with-local-
prefix=/usr/local/pa20_32 --with-gnu-as --with-as=/usr/local/pa20_32/bin/as --
with-ld=/usr/ccs/bin/ld
 --disable-shared --disable-nls
Thread model: single
gcc version 3.4.0
Comment 1 Andrew Pinski 2004-04-29 14:41:21 UTC
Can you attach the preprocessed source?
Comment 2 Martin 2004-04-29 20:56:11 UTC
I have compiled the source with 'CFLAGS -save-temps'.
Do you need motion_est.i and motion_est.s ?
Comment 3 Andrew Pinski 2004-04-29 20:58:14 UTC
Just motion_est.i would be fine.
Comment 4 Martin 2004-04-30 06:27:45 UTC
Created attachment 6195 [details]
preprocessed source from motion_est.i.bz2
Comment 5 Andrew Pinski 2004-04-30 13:30:36 UTC
Moving to invalid to move to ...
Comment 6 Andrew Pinski 2004-04-30 13:30:55 UTC
Uncinfirmed state.
Comment 7 Andrew Pinski 2004-04-30 15:03:43 UTC
I can confirm this on the mainline but have not reduced it fully yet (it is hard as it depends on an inline 
function).
Comment 8 Dara Hazeghi 2004-05-01 08:08:30 UTC
Created attachment 6205 [details]
reduced testcase (45 lines)

Here's the somewhat reduced testcase of this crash.
Comment 9 Dara Hazeghi 2004-05-01 08:09:15 UTC
Confirmed with 3.4 branch.
Comment 10 Andrew Pinski 2004-05-01 12:38:54 UTC
Here is something slightly more reduced (31 lines), removing typedefs and unneeded 
functions and unneeded agruments:
typedef struct MotionEstContext
{
  void  (**hpel_avg)(int *block , const int pixels);
  int xmin, xmax, ymin, ymax;
} MotionEstContext;

typedef struct MpegEncContext {
  int mv_type;
  MotionEstContext me;
} MpegEncContext;

int cmp(MpegEncContext *s, const int x, const int y, const int subx, const int suby,
						     const int flags)
{
    MotionEstContext * const c = &s->me;
    const int qpel = flags;
    const int hx = subx + (x<<(1+qpel));
    const int hy = suby + (y<<(1+qpel));

    if(flags)
      if(x >= c->xmin && hx <= c->xmax<<(qpel+1) && y >= c->ymin && hy <= c->ymax<<
(qpel+1))
            if(s->mv_type==1) {
                int i;
                for(i=0; i<4; i++) {
		  int by = hy ? 2 : 3;
		  int bxy= (3) + ((by&3)<<(qpel+1));
		  c->hpel_avg[bxy](&bxy,by);
                }
            }
    return 0;
}
Comment 11 CVS Commits 2004-05-07 03:09:19 UTC
Subject: Bug 15202

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	danglin@gcc.gnu.org	2004-05-07 03:09:15

Modified files:
	gcc            : ChangeLog 
	gcc/config/pa  : pa.md 

Log message:
	PR target/15202
	* pa.md (movdi, movsi, movhi, movqi): Support move from shift amount
	register to general register.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3592&r2=2.3593
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa.md.diff?cvsroot=gcc&r1=1.145&r2=1.146

Comment 12 John David Anglin 2004-05-07 21:15:07 UTC
Martin,

Can you provide feedback on whether or not the patch resolves the ICE
compiling MPlayer-1.0pre4.  The patch should apply to 3.3 and 3.4.
Comment 13 Martin 2004-05-10 16:33:43 UTC
John,
i applied the patch to gcc-3.4.0 pa.md.
MPlayer compiles now w/o problem.

thanks Martin
Comment 14 Andrew Pinski 2004-05-14 12:40:53 UTC
Thanks.  

David can you try to get this into 3.4.1?
Comment 15 dave 2004-05-14 17:08:15 UTC
Subject: Re:  [3.4 only] ICE in reload_cse_simplify_operands

> David can you try to get this into 3.4.1?

I was going test the patch with 3.3 and 3.4, but I haven't had a chance
to do it yet.

Dave
Comment 16 CVS Commits 2004-05-18 15:12:03 UTC
Subject: Bug 15202

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	danglin@gcc.gnu.org	2004-05-18 15:11:56

Modified files:
	gcc            : ChangeLog 
	gcc/config/pa  : pa.md 

Log message:
	PR target/15202
	* pa.md (movdi, movsi, movhi, movqi): Support move from shift amount
	register to general register for DI, SI, HI and QI modes.  Remove
	move to shift amount register in DF mode.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.445&r2=2.2326.2.446
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.138.4.5&r2=1.138.4.6

Comment 17 Andrew Pinski 2004-05-18 15:20:49 UTC
Fixed for 3.4.1.
Comment 18 John David Anglin 2004-06-22 01:55:57 UTC
Created attachment 6601 [details]
Fix for 3.3 branch
Comment 19 Gabriel Dos Reis 2004-07-25 19:37:07 UTC
(In reply to comment #18)
> Created an attachment (id=6601)
> Fix for 3.3 branch

This OK for 3.3.x

Thanks,

-- Gaby


Comment 20 CVS Commits 2004-07-25 21:19:35 UTC
Subject: Bug 15202

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	danglin@gcc.gnu.org	2004-07-25 21:19:29

Modified files:
	gcc            : ChangeLog 
	gcc/config/pa  : pa.md 

Log message:
	PR target/15202
	* pa.md (movdi, movsi, movhi, movqi): Support move from shift amount
	register to general register for DI, SI, HI and QI modes.  Remove
	move to shift amount register in DF mode.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.1005&r2=1.16114.2.1006
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa.md.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.116.2.12&r2=1.116.2.13

Comment 21 Andrew Pinski 2004-07-25 21:21:13 UTC
Fixed also for 3.3.5.