Crash on Digital ALPHA : External variables

Alessio Terpin terpin@infis.univ.trieste.it
Fri Apr 7 15:27:00 GMT 2000


Hi Ml

I have used for develop a Linux sistem 2.2.14 RedHat 6.1
on this system i have write my code with gcc

gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

I have use for compiling the option
-ansi -pedantic -Wall
and get no warnig
and test all optimization and have no problem

When i have ported my code on Digital ALPHA

Reading specs from
/usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.8.1/specs
gcc version 2.8.1

The version that use external varibles crash if complied with gcc and cc

The crash seem me strange because it happen only in same case :

gcc :  no optimization                   OK
       -O1                               OK
       -O2                               OK
       -O3                               CRASH
       -O3 -mno-soft-float -mfp-regs     CRASH
ALPHA
cc   : no optomization                   CRASH
       -O1                               CRASH
       -02                               OK
       -O3                               CRASH
       -O4                               CRASH

The only change in the code happen in this Function
that make a weighted avarage on a vector

double y[N];
double y14[N];
double y64[N] ;

void xax3(double *xax , double *x ,double *c ,double  eta){

  extern double y[N];
  extern double y14[N];
  extern double y64[N] ;

........
}

If possibile some error on the use of of external variables ?
Or there is some Problem in porting code C that use the external
variables between varius OS ?

Thanks in Advance for help that can give me :-)


P.S. Sorry for my English :-)
--
Saluti da Alessio Terpin

|---------------------------------------|
| Hello World!                          |
| The most difficult things to do ! K&R |
|---------------------------------------|




More information about the Gcc-help mailing list