[Bug middle-end/20187] New: wrong code for ((unsigned char)(unsigned long long)((a?a:1)(a*b)))?0:1)

2005-02-24 Thread heinrich dot brand at fujitsu-siemens dot com
Function test has value 0. Should have value 1;

#include stdio.h
int a=0x101;
int b=0x100;

int test(){
 return (
  ((unsigned char)(unsigned long long) ( (a?a:1)  (a*b) ))
  ?  0 : 1 );
}

int main(void){
 if((unsigned char)(unsigned long long) (a(a*b)))return 2;
 if( test() ){
printf(successful\n); return 0;
 } else { 
printf(failed\n); return 1;
 } 
} 

Related to Bug 19606? 

GNU CPP version 2.95.2 19991024 (release) (sparc) successful
GNU C version 3.3.3 (sparc-sun-solaris2.8)  failed

GNU CPP version 3.2 (cpplib) (i386 Linux/ELF) failed 
GNU C version 3.3.2 (i686-pc-linux-gnu) failed
GNU C version 3.3.5 (i686-pc-linux-gnu) failed
GNU C version 3.4.3 (i686-pc-linux-gnu) failed

-- 
   Summary: wrong code for ((unsigned char)(unsigned long
long)((a?a:1)(a*b)))?0:1)
   Product: gcc
   Version: 3.4.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: heinrich dot brand at fujitsu-siemens dot com
CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux
  GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20187


[Bug middle-end/19606] New: wrong code for arith.expr: (((unsigned int)(signed int) a ) / 2LL) with signed char a=-4

2005-01-24 Thread heinrich dot brand at fujitsu-siemens dot com
The value of test should be 0x7ffe and is 0xfffe; 

Flags: none

(Also in 3.3.5)

#include stdio.h
signed char a=-4;
int test(){
return (((unsigned int)(signed int) a ) / 2LL) ;
}

int main(void){
int r;
r=test();
printf(test output:  %#x == %d  %x %x\n,r,r
,(r==0x7ffe),(r==0xfffe));
if(r == ( ((unsigned int)(signed int) (signed char) -4 ) / 2LL ))
printf(test successful\n);
else
printf(test failed\n);  
return 0; 
}

-- 
   Summary: wrong code for arith.expr: (((unsigned int)(signed int)
a ) / 2LL) with signed char a=-4
   Product: gcc
   Version: 3.4.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: heinrich dot brand at fujitsu-siemens dot com
CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: Intel-Linux
  GCC host triplet: Intel-Linux
GCC target triplet: Intel-Linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19606


[Bug middle-end/19100] New: Wrong code for ?-operator with casted ?-operator predicat

2004-12-21 Thread heinrich dot brand at fujitsu-siemens dot com
The function test returns 17 not 18 as required.

#include stdio.h

signed char test(long v[]){
 return ( ( ((signed char) (v[1] ?  0x100 : 0 ))) ?  17 : 18); 
}

int main(void){
static long v[3];
v[1]=2;
printf(test : %d\n,test(v));
return 0; 
}

-- 
   Summary: Wrong code for ?-operator with casted ?-operator
predicat
   Product: gcc
   Version: 3.4.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: heinrich dot brand at fujitsu-siemens dot com
CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19100


[Bug middle-end/18927] O(n^2) compile time with -O0 (n= number of basic blocks) in local alloc

2004-12-13 Thread heinrich dot brand at fujitsu-siemens dot com

--- Additional Comments From heinrich dot brand at fujitsu-siemens dot com  
2004-12-13 11:37 ---
 My compiler outputs really this line:
 global alloc  :1083.72 (99%) usr   0.39 (51%) sys1085.19 (99%) wall

Line with context:

[EMAIL PROTECTED]:~/CCS/GLOBALALLOC/04 /home/hei/GCCBIN/3.4.3/bin/gcc -S -O0 
-v -
ftime-report z.c
Lese Spezifikationen von /home/hei/GCCBIN/3.4.3/lib/gcc/i686-pc-linux-
gnu/3.4.3/specs
Konfiguriert mit: ../gcc-3.4.3/configure -prefix /home/hei/GCCBIN/3.4.3 --
enable-checking
Thread-Modell: posix
gcc-Version 3.4.3
 /home/hei/GCCBIN/3.4.3/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1 -quiet -v z.c -
quiet -dumpbase z.c -mtune=pentiumpro -auxbase z -O0 -version -ftime-report -o 
z.s
nicht vorhandenes Verzeichnis »/home/hei/GCCBIN/3.4.3/lib/gcc/i686-pc-linux-
gnu/3.4.3/../../../../i686-pc-linux-gnu/include« wird ignoriert
#include ... - Suche beginnt hier:
#include ... - Suche beginnt hier:
 /usr/local/include
 /home/hei/GCCBIN/3.4.3/include
 /home/hei/GCCBIN/3.4.3/lib/gcc/i686-pc-linux-gnu/3.4.3/include
 /usr/include
Ende der Suchliste.
GNU C version 3.4.3 (i686-pc-linux-gnu)
compiled by GNU C version 3.2.
GGC-Heuristik: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Ausführungszeiten (Sekunden)
 garbage collection:   1.27 ( 0%) usr   0.00 ( 0%) sys   1.27 ( 0%) wall
 cfg construction  :   0.56 ( 0%) usr   0.00 ( 0%) sys   0.56 ( 0%) wall
 cfg cleanup   :   0.17 ( 0%) usr   0.00 ( 0%) sys   0.17 ( 0%) wall
 trivially dead code   :   0.26 ( 0%) usr   0.00 ( 0%) sys   0.26 ( 0%) wall
 life analysis :   0.98 ( 0%) usr   0.00 ( 0%) sys   0.98 ( 0%) wall
 life info update  :   0.43 ( 0%) usr   0.00 ( 0%) sys   0.43 ( 0%) wall
 register scan :   0.49 ( 0%) usr   0.03 ( 4%) sys   0.52 ( 0%) wall
 rebuild jump labels   :   0.31 ( 0%) usr   0.00 ( 0%) sys   0.31 ( 0%) wall
 preprocessing :   0.20 ( 0%) usr   0.05 ( 6%) sys   0.24 ( 0%) wall
 lexical analysis  :   0.26 ( 0%) usr   0.09 (12%) sys   0.36 ( 0%) wall
 parser:   0.89 ( 0%) usr   0.05 ( 6%) sys   0.95 ( 0%) wall
 expand:   1.22 ( 0%) usr   0.05 ( 6%) sys   1.27 ( 0%) wall
 jump  :   0.07 ( 0%) usr   0.00 ( 0%) sys   0.07 ( 0%) wall
 flow analysis :   0.35 ( 0%) usr   0.01 ( 1%) sys   0.36 ( 0%) wall
 local alloc   :   2.50 ( 0%) usr   0.06 ( 8%) sys   2.56 ( 0%) wall
 global alloc  :1083.72 (99%) usr   0.39 (51%) sys1085.19 (99%) wall
 flow 2:   0.96 ( 0%) usr   0.00 ( 0%) sys   0.96 ( 0%) wall
 shorten branches  :   0.94 ( 0%) usr   0.01 ( 1%) sys   0.95 ( 0%) wall
 final :   1.25 ( 0%) usr   0.03 ( 4%) sys   1.37 ( 0%) wall
 rest of compilation   :   2.50 ( 0%) usr   0.00 ( 0%) sys   2.50 ( 0%) wall
 GESAMT:1099.35 0.77  1101.32
[EMAIL PROTECTED]:~/CCS/GLOBALALLOC/04 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18927


[Bug target/18927] New: O(n^2) compile time with -O0 (n= number of basic blocks) in global alloc

2004-12-10 Thread heinrich dot brand at fujitsu-siemens dot com
 {gsub(:, );ga=$3; proz=$4 }
  $1==user { u=$2; }
  $1==###  $2==BB {bb=$3;}
  $4==z.s {printf(%s\t %s\t %s\t %s\t %s\n,bb,u,ga,proz ,$1)};
' nohup.out

-- 
   Summary: O(n^2) compile time with -O0 (n= number of basic blocks)
in global alloc
   Product: gcc
   Version: 3.4.3
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: heinrich dot brand at fujitsu-siemens dot com
CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: Intel SUSE 8.1
  GCC host triplet: Intel SUSE 8.1
GCC target triplet: Intel SUSE 8.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18927