__builtin_isless, __builtin_islessequal on mips targets

2005-05-05 Thread Nadezhda Ivanоvna Vyukova
The __builtin_isless, __builtin_islessequal functions are provided as 
implementations of standard C99 functions 'isless', 'isgreater'. Please,
explain why gcc for mips implements them via instructions 

c.lt.FMT and 
c.le.FMT 

instead of 

c.olt.FMT and 
c.ole.FMT.





mips targets: seq_df, seq_sf

2005-09-09 Thread Nadezhda Ivanоvna Vyukova
Please, explain, why mips.md specifies c.eq.d, c.eq.s instructions
in seq_df and seq_sf RTF templates? Why not c.seq.d and c.seq.s?

Seems, use of c.eq.d, c.eq.s causes violation of IEC 60559.

Best regards, 
Nadezhda I. Vyukova



Gcc silently transforms a finite loop to an infinite one

2011-11-29 Thread Nadezhda Ivanоvna Vyukova
Hello, members of GCC development team!
I am involved in support of customers who use GCC.
Recently a customer has complaint that gcc-4.1.2
generates an infinite loop for the following program:

  #include 
  extern void f (int);
  int main ()
  {
  char e = 0;
 do
 {
   printf ("--- e = %i\n", e);
 }
 while (++e);
  }

When compiled with -O2 or higher the program prints
0, 1, ..., 128, ... 1000, ... etc.
(Similar behavior is exposed by gcc-4.6.2).

I've explained the customer that by default char is treated
as signed char on our platform and therefore this program 
does not conform ISO C90, as it causes the integer overflow
(undefined behavior). But he was not satisfied.
He argued that the program compiled with gcc-3.4.6 behaves 
"correctly" and now the compiler silently produces an 
incomprehensible code.

IMHO it would be better to issue a warning
when a finite loop is transformed to an infinite one
(as a result of -ftree-vrp).

Best regards,
Nadezhda Vyukova,
Scientific Research Institute of System Analysis,
RAS