Bug 14484 - [3.3 regression] -mabi=64 and -O -> as error
Summary: [3.3 regression] -mabi=64 and -O -> as error
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.3
: P2 critical
Target Milestone: 3.3.6
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2004-03-08 17:21 UTC by Tim Smith
Modified: 2005-01-21 04:13 UTC (History)
2 users (show)

See Also:
Host: mips-sgi-irix6.5
Target: mips-sgi-irix6.5
Build: mips-sgi-irix6.5
Known to work: 3.0.4 3.4.0
Known to fail: 3.1 3.2.3 3.3.4
Last reconfirmed: 2004-12-28 02:14:45


Attachments
test case file (29.46 KB, text/plain)
2004-03-08 17:41 UTC, Tim Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Smith 2004-03-08 17:21:15 UTC
$ uname -a
IRIX64 hostname 6.5 10070055 IP35
$ gcc -O -mabi=64 -c problem.c
as: Error: /usr/tmp/ccj6mI7m.s, line 1486: Macro instruction used in branch
delay slot
$ gcc -O2 -mabi=64 -c problem.c
$ gcc -v
Reading specs from
/home/projects/foo/install/lib/gcc-lib/mips-sgi-irix6.5/3.3.3/specs
Configured with: ./configure --prefix=/home/projects/foo/install
Thread model: single
gcc version 3.3.3

http://www.magnesium.net/~thim/tmp/problem.c

This file comes from 'gcc -E isam/_packrec.c', from the MySQL 4.1.1
distribution.  This is a client's machine, so unfortunately I can't offer you a
login.  There's an easy work-around (use -O2 or -O3 instead of -O), so this
isn't critical for me.

Thanks!
Comment 1 Tim Smith 2004-03-08 17:41:50 UTC
Created attachment 5884 [details]
test case file
Comment 2 Volker Reichelt 2004-06-07 15:17:57 UTC
Confirmed.

Here's a short testcase that causes assembler errors also for -O2 and -O3.
The 3.3 branch is affected, but not the 3.4 branch. I can't test mainline
right now.

===================================================================
int x[]= { 0 };

void foo(short **p, int *a, int *b, int i, unsigned u)
{
    while (i+1)
        if (i)
            **p= x[0];
        else
            **p= (u ? ((*a >> *b-i) & x[u]) : bar()) + 32768 + i;
}
===================================================================
Comment 3 Gabriel Dos Reis 2004-09-28 13:26:35 UTC
slip.
Comment 4 Andrew Pinski 2004-09-28 13:29:09 UTC
I am going to assume you did not mean to close this bug, only to move the target milestone.
Comment 5 Gabriel Dos Reis 2005-01-21 04:13:14 UTC
I don't think this bug will be fixed for 3.3.x.
The testcas is known to work 3.4.x (higher I suppose).
So closing as won't fix.