This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in egcs-2.90.29 (Linux systems)



Bug trigger by 
  g++ -c Debug.cc -Wall -I . -I /home/vincent/include -O2
Messages:
 Debug.cc: In method `double VectorC::ChirpFWHM(const class VectorC &) const':
 Debug.cc:24: warning: unused variable `int i2'
 Debug.cc:23: warning: unused variable `int i1'
 Debug.cc:26: Internal compiler error.
 Debug.cc:26: Please submit a full bug report to `egcs-bugs@cygnus.com'.

[file Debug.cc provided here after]

Note: 
1. The program have been trimmed to the minimum necessary to show the bug.
2. The bug does no apper if any of the following is done:
2.1. Run the preprocessor separately
  gcc -E Debug.cc -O2 >Debug2.c; gcc -c Debug2.c -Wall
2.2. Suppress the optimizations
2.3. Suppress any line of the program (like suppressing "#include <complex.h>")
3. The bug does not seem to be affected by comments.
4. The bug does not happen on FreeBSD
5. uname -a:
   Linux kid2.comm.eng.osaka-u.ac.jp 2.0.35 #2 Wed Sep 9 15:37:58 JST 1998 \
      i586 unknown
6. Linux version: RedHat5.2, mostly standard packages
7. egcs-2.90.29 980515 (egcs-1.0.3 release) from the RedHat5.2 RPM
8. Bug is 100% reproductible on my machine, and never happens on FreeBSD
8b. Bug is also 100% reproductible on other RedHat5.2 computers
   (kernel 2.0.36 SMP)
9. glibc-2.0.7-29 from the RedHat5.2 RPM
10. libstdc++-devel-2.8.0-14 from the RedHat5.2 RPM for <complex.h>
11. libstdc++-2.8.0-14 from the RedHat5.2 RPM


=============================== Debug.cc =============================
#include <complex.h>

class VectorC {
 public:
  VectorC(const VectorC&);
  ~VectorC();
  double reverse_index_real(double) const;
  double ChirpFWHM(const VectorC&) const;
};

double VectorC::ChirpFWHM(const VectorC& time) const
{
  VectorC V(*this);
  int i1=int(floor(time.reverse_index_real(-1.0/2.0)));
  int i2=int(floor(time.reverse_index_real(+1.0/2.0)));
  return 0.0;
}
============================= end of Debug.cc =====================

-- 
Vincent Cautaerts





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]