🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6241

strength reduction bug in gcc 2.7.x

#6241
From: Matthias Urlichs
Date: Thu, 21 Dec 1995 00:00
26 lines
1006 bytes
The bug shows (at least, possibly) on the i386 by compilation with -O2
versus -O2 -fno-strength-reduce, of the program below.

I offer $100 to anybody who fixes that bug. Adding -fno-strength-reduce to
the specs file isn't a bug fix.  :-/


#include <stdio.h>
int A[3];
unsigned int B = 3;
  
void printit(void)
{
  int i;
  for(i = 0; i < B; i++)
    fprintf(stdout, "A[%d] = %d\n", i, A[i]);
}
  
int main()
{
  int i;
  for(i = 0; i < B; i++)
     A[i] = i - 3;
  printit();
  return 0;
}
Technical Details
Message-ID: <4bcbn8$pee@work.smurf.noris.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <199512040444.EAA11894@shellx.best.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,6eef9ba452537231
X-Google-Attributes: gid113d02,public
From: smurf@work.smurf.noris.de (Matthias Urlichs)
Subject: strength reduction bug in gcc 2.7.x
Date: 1995/12/21
Message-ID: <4bcbn8$pee@work.smurf.noris.de>
X-Deja-AN: 122600010
distribution: gnu
sender: daemon@cis.ohio-state.edu
references: <199512040444.EAA11894@shellx.best.com>
organization: noris network GbR, Nuernberg, FRG
newsgroups: gnu.gcc.bug