🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James Clark Mon, 12 Jun 1989 19:16
-fstrength-reduce problem
#55
Author: James Clark
Date: Mon, 12 Jun 1989 19:16
30 lines
1242 bytes
-fstrength-reduce loses on the following:

Script started on Mon Jun 12 20:14:14 1989
jclark% cat bug.c
class A {
  static A *list;
  A *next;
  int n;
 public:
  void foo();
};

void A::foo()
{
  for (int i = 0; i < 1024; i++)
    list[i].next = list + i + 1;
}
jclark% g++ -O -fstrength-reduce -c -v bug.c
g++ version 1.35.1-
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__OPTIMIZE__ bug.c /tmp/cca23235.cpp
GNU CPP version 1.35
 /usr/local/lib/gcc-cc1plus /tmp/cca23235.cpp -quiet -dumpbase bug.c -fstrength-reduce -opt -version -o /tmp/cca23235.s
GNU C++ version 1.35.1- (sparc) compiled by GNU C version 1.35.
g++: Program cc1plus got fatal signal 6.
jclark% exit
jclark% 
script done on Mon Jun 12 20:14:34 1989

James Clark
jjc@jclark.uucp
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads