[Bug tree-optimization/43505] [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3

2010-03-28 Thread hubicka at gcc dot gnu dot org


--- Comment #10 from hubicka at gcc dot gnu dot org  2010-03-28 21:47 
---
Subject: Bug 43505

Author: hubicka
Date: Sun Mar 28 21:46:50 2010
New Revision: 157786

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157786
Log:

PR tree-optimization/43505
* cgraph.c (cgraph_clone_node): When clonning a clone, replacement
map should not be copied.
* gfortran.dg/pr43505.f90: New testcase.

Added:
trunk/gcc/testsuite/gfortran.dg/pr43505.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraph.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/43505] [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3

2010-03-27 Thread hubicka at gcc dot gnu dot org


--- Comment #9 from hubicka at gcc dot gnu dot org  2010-03-27 18:30 ---
Have patch in testing. Problem is that inliner is copying the clone info
including the replacement when producing clone of clone that leads to
transformations sometimes being applied multiple times.


-- 

hubicka at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-03-24 09:52:14 |2010-03-27 18:30:42
   date||


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



[Bug tree-optimization/43505] [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3

2010-03-27 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P1


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



[Bug tree-optimization/43505] [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3

2010-03-26 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2010-03-26 10:57 ---
I see

(gdb) b error
Breakpoint 5 at 0x6a072d: file /space/rguenther/src/svn/trunk/gcc/diagnostic.c,
line 629.
(gdb) run
Breakpoint 5, error (
gmsgid=0x11a45c0 type mismatch between an SSA_NAME and its symbol)
at /space/rguenther/src/svn/trunk/gcc/diagnostic.c:629
629   va_start (ap, gmsgid);
(gdb) up
#1  0x00b99e0b in verify_ssa_name (ssa_name=0x75ae4d10, 
is_virtual=0 '\000') at /space/rguenther/src/svn/trunk/gcc/tree-ssa.c:587
587   error (type mismatch between an SSA_NAME and its symbol);
(gdb) l
582   return true;
583 }
584
585   if (TREE_TYPE (ssa_name) != TREE_TYPE (SSA_NAME_VAR (ssa_name)))
586 {
587   error (type mismatch between an SSA_NAME and its symbol);
588   return true;
589 }
590
591   if (SSA_NAME_IN_FREE_LIST (ssa_name))
(gdb) p ssa_name-common.type
$1 = (tree) 0x77fcab28
(gdb) p ssa_name-ssa_name.var-common.type
$2 = (tree) 0x75ad9c78

(gdb) call debug_tree ($1)
 pointer_type 0x77fcab28
type array_type 0x77fca540
type real_type 0x77eee000 real(kind=4) SF
size integer_cst 0x77ed2988 constant 32
unit size integer_cst 0x77ed2690 constant 4
align 32 symtab 0 alias set 2 canonical type 0x77eee000
precision 32
pointer_to_this pointer_type 0x77eee1f8 reference_to_this
reference_type 0x77fc3a80
type_2 BLK
size var_decl 0x77fc6500 D.1556 type integer_type 0x77ee10a8
bit_size_type
used unsigned ignored DI file t.f90 line 28 col 0
size integer_cst 0x77ed2a50 constant 64
unit size integer_cst 0x77ed2a78 constant 8
align 64 context function_decl 0x77fc5800 anyavg chain
var_decl 0x77fc65a0 D.1557
unit size var_decl 0x77fc65a0 D.1557 type integer_type
0x77ee1000
used unsigned ignored DI file t.f90 line 28 col 0 size integer_cst
0x77ed2a50 64 unit size integer_cst 0x77ed2a78 8
align 64 context function_decl 0x77fc5800 anyavg
align 32 symtab 0 alias set -1 canonical type 0x77fca540
domain integer_type 0x77fcaf18 type integer_type 0x77ee15e8
integer(kind=8)
DI size integer_cst 0x77ed2a50 64 unit size integer_cst
0x77ed2a78 8
align 64 symtab 0 alias set -1 canonical type 0x77fcaf18
precision 64 min integer_cst 0x77ef1780 0 max var_decl 0x77fc6460
D.1555
pointer_to_this pointer_type 0x77fcaa80
unsigned restrict type_2 DI size integer_cst 0x77ed2a50 64 unit size
integer_cst 0x77ed2a78 8
align 64 symtab 0 alias set -1 canonical type 0x77fcab28
(gdb) call debug_tree ($2)
 pointer_type 0x75ad9c78
type array_type 0x75ad9a80
type real_type 0x77eee000 real(kind=4) SF
size integer_cst 0x77ed2988 constant 32
unit size integer_cst 0x77ed2690 constant 4
align 32 symtab 0 alias set 2 canonical type 0x77eee000
precision 32
pointer_to_this pointer_type 0x77eee1f8 reference_to_this
reference_type 0x77fc3a80
type_2 BLK
size var_decl 0x75addb40 D.1623 type integer_type 0x77ee10a8
bit_size_type
used unsigned ignored DI file t.f90 line 28 col 0
size integer_cst 0x77ed2a50 constant 64
unit size integer_cst 0x77ed2a78 constant 8
align 64 context function_decl 0x75ae1c00 anyavg.1546.clone.0
abstract_origin var_decl 0x77fc6500 D.1556
unit size var_decl 0x75addaa0 D.1622 type integer_type
0x77ee1000
used unsigned ignored DI file t.f90 line 28 col 0 size integer_cst
0x77ed2a50 64 unit size integer_cst 0x77ed2a78 8
align 64 context function_decl 0x75ae1c00 anyavg.1546.clone.0
abstract_origin var_decl 0x77fc65a0 D.1557
align 32 symtab 0 alias set -1 canonical type 0x77fca540
domain integer_type 0x75ad9b28 type integer_type 0x77ee15e8
integer(kind=8)
DI size integer_cst 0x77ed2a50 64 unit size integer_cst
0x77ed2a78 8
align 64 symtab 0 alias set -1 canonical type 0x77fcaf18
precision 64 min integer_cst 0x77ef1780 0 max var_decl 0x75addbe0
D.1624
pointer_to_this pointer_type 0x75ad9bd0
unsigned restrict DI size integer_cst 0x77ed2a50 64 unit size
integer_cst 0x77ed2a78 8
align 64 symtab 0 alias set -1 canonical type 0x77fcab28

so the difference is that the type of the SSA name has TYPE_LANG_FLAG_2
set for both the pointer and the array type while the SSA name variable
has not.  They do both have the same canonical type (but not the same
main variants).

The SSA name type is built from

0x005cc8b1 in gfc_get_nodesc_array_type (etype=0x77eee000, 
as=0x17a7520, 

[Bug tree-optimization/43505] [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3

2010-03-26 Thread paul dot richard dot thomas at gmail dot com


--- Comment #7 from paul dot richard dot thomas at gmail dot com  
2010-03-26 11:08 ---
Subject: Re:  [4.5 Regression] type mismatch 
between an SSA_NAME and its symbol with -O3

Richi,  Thanks for intervening.  Paul

On Fri, Mar 26, 2010 at 11:57 AM, rguenth at gcc dot gnu dot org
gcc-bugzi...@gcc.gnu.org wrote:


 --- Comment #6 from rguenth at gcc dot gnu dot org  2010-03-26 10:57 
 ---
 I see

 (gdb) b error
 Breakpoint 5 at 0x6a072d: file 
 /space/rguenther/src/svn/trunk/gcc/diagnostic.c,
 line 629.
 (gdb) run
 Breakpoint 5, error (
    gmsgid=0x11a45c0 type mismatch between an SSA_NAME and its symbol)
    at /space/rguenther/src/svn/trunk/gcc/diagnostic.c:629
 629       va_start (ap, gmsgid);
 (gdb) up
 #1  0x00b99e0b in verify_ssa_name (ssa_name=0x75ae4d10,
    is_virtual=0 '\000') at /space/rguenther/src/svn/trunk/gcc/tree-ssa.c:587
 587           error (type mismatch between an SSA_NAME and its symbol);
 (gdb) l
 582           return true;
 583         }
 584
 585       if (TREE_TYPE (ssa_name) != TREE_TYPE (SSA_NAME_VAR (ssa_name)))
 586         {
 587           error (type mismatch between an SSA_NAME and its symbol);
 588           return true;
 589         }
 590
 591       if (SSA_NAME_IN_FREE_LIST (ssa_name))
 (gdb) p ssa_name-common.type
 $1 = (tree) 0x77fcab28
 (gdb) p ssa_name-ssa_name.var-common.type
 $2 = (tree) 0x75ad9c78

 (gdb) call debug_tree ($1)
  pointer_type 0x77fcab28
    type array_type 0x77fca540
        type real_type 0x77eee000 real(kind=4) SF
            size integer_cst 0x77ed2988 constant 32
            unit size integer_cst 0x77ed2690 constant 4
            align 32 symtab 0 alias set 2 canonical type 0x77eee000
 precision 32
            pointer_to_this pointer_type 0x77eee1f8 reference_to_this
 reference_type 0x77fc3a80
        type_2 BLK
        size var_decl 0x77fc6500 D.1556 type integer_type 0x77ee10a8
 bit_size_type
            used unsigned ignored DI file t.f90 line 28 col 0
            size integer_cst 0x77ed2a50 constant 64
            unit size integer_cst 0x77ed2a78 constant 8
            align 64 context function_decl 0x77fc5800 anyavg chain
 var_decl 0x77fc65a0 D.1557
        unit size var_decl 0x77fc65a0 D.1557 type integer_type
 0x77ee1000
            used unsigned ignored DI file t.f90 line 28 col 0 size integer_cst
 0x77ed2a50 64 unit size integer_cst 0x77ed2a78 8
            align 64 context function_decl 0x77fc5800 anyavg
        align 32 symtab 0 alias set -1 canonical type 0x77fca540
        domain integer_type 0x77fcaf18 type integer_type 0x77ee15e8
 integer(kind=8)
            DI size integer_cst 0x77ed2a50 64 unit size integer_cst
 0x77ed2a78 8
            align 64 symtab 0 alias set -1 canonical type 0x77fcaf18
 precision 64 min integer_cst 0x77ef1780 0 max var_decl 0x77fc6460
 D.1555
        pointer_to_this pointer_type 0x77fcaa80
    unsigned restrict type_2 DI size integer_cst 0x77ed2a50 64 unit size
 integer_cst 0x77ed2a78 8
    align 64 symtab 0 alias set -1 canonical type 0x77fcab28
 (gdb) call debug_tree ($2)
  pointer_type 0x75ad9c78
    type array_type 0x75ad9a80
        type real_type 0x77eee000 real(kind=4) SF
            size integer_cst 0x77ed2988 constant 32
            unit size integer_cst 0x77ed2690 constant 4
            align 32 symtab 0 alias set 2 canonical type 0x77eee000
 precision 32
            pointer_to_this pointer_type 0x77eee1f8 reference_to_this
 reference_type 0x77fc3a80
        type_2 BLK
        size var_decl 0x75addb40 D.1623 type integer_type 0x77ee10a8
 bit_size_type
            used unsigned ignored DI file t.f90 line 28 col 0
            size integer_cst 0x77ed2a50 constant 64
            unit size integer_cst 0x77ed2a78 constant 8
            align 64 context function_decl 0x75ae1c00 anyavg.1546.clone.0
 abstract_origin var_decl 0x77fc6500 D.1556
        unit size var_decl 0x75addaa0 D.1622 type integer_type
 0x77ee1000
            used unsigned ignored DI file t.f90 line 28 col 0 size integer_cst
 0x77ed2a50 64 unit size integer_cst 0x77ed2a78 8
            align 64 context function_decl 0x75ae1c00 anyavg.1546.clone.0
 abstract_origin var_decl 0x77fc65a0 D.1557
        align 32 symtab 0 alias set -1 canonical type 0x77fca540
        domain integer_type 0x75ad9b28 type integer_type 0x77ee15e8
 integer(kind=8)
            DI size integer_cst 0x77ed2a50 64 unit size integer_cst
 0x77ed2a78 8
            align 64 symtab 0 alias set -1 canonical type 0x77fcaf18
 precision 64 min integer_cst 0x77ef1780 0 max var_decl 0x75addbe0
 D.1624
        pointer_to_this pointer_type 0x75ad9bd0
    unsigned restrict DI size integer_cst 0x77ed2a50 64 unit size
 integer_cst 0x77ed2a78 8
    align 64 symtab 0 alias set -1 canonical 

[Bug tree-optimization/43505] [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3

2010-03-26 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2010-03-26 15:10 ---
*** Bug 41056 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dominiq at lps dot ens dot
   ||fr


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