Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 31792 - gcc-2.96-69 generates code rejected by assembler
gcc-2.96-69 generates code rejected by assembler
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-14 13:50 EST by Alan Peckham
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-03-14 13:50:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alan Peckham 2001-03-14 13:50:13 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (Win98; U)

Optimized expression produces bad assembler code

Reproducible: Always
Steps to Reproduce:
1. source file follows

Actual Results:  $ cc -O /tmp/test.c
/tmp/cc6qpTmE.s: Assembler messages:
/tmp/cc6qpTmE.s:32: Error: `%al' not allowed with `cmpw'

Expected Results:  no errors...

typedef struct {
    int a[100];
    unsigned char b;
} a_t;

void load_a (a_t *a_p) {
    int i; for (i=0;i<100;i++) a_p->a[i]=i; a_p->b = 101;

void test_a (a_t *a_p, unsigned b) {
    if (((char) ((a_p->b) - (b))) < 0) a_p->b = b;

main () {
    a_t a;
    load_a(&a); test_a(&a,30);
Comment 1 Bill Nottingham 2001-03-14 14:33:29 EST
Works fine for me with 2.96-78 and the current binutils.

Note You need to log in before you can comment on or make changes to this bug.