[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-27 Thread eedelman at gcc dot gnu dot org


--- Comment #18 from eedelman at gcc dot gnu dot org  2006-01-27 17:19 
---
Subject: Bug 25716

Author: eedelman
Date: Fri Jan 27 17:19:36 2006
New Revision: 110302

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110302
Log:
fortran/
2005-01-27  Erik Edelmann  [EMAIL PROTECTED]

PR fortran/25716
* symbol.c (free_old_symbol): New function.
(gfc_commit_symbols): Use it.
(gfc_commit_symbol): New function.
(gfc_use_derived): Use it.
* gfortran.h: Add prototype for gfc_commit_symbol.
* intrinsic.c (gfc_find_function): Search in 'conversion'
if not found in 'functions'.
(gfc_convert_type_warn): Add a symtree to the new
expression node, and commit the new symtree-n.sym.
* resolve.c (gfc_resolve_index): Make sure typespec is
properly initialized.

testsuite/
2005-01-27  Erik Edelmann  [EMAIL PROTECTED]

PR fortran/25716
* gfortran.dg/char_result_11.f90: Make it sensitive to PR
25716 on 32-bit systems too.


Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/gfortran.h
branches/gcc-4_1-branch/gcc/fortran/intrinsic.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/symbol.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90


-- 


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-27 Thread pinskia at gcc dot gnu dot org


--- Comment #19 from pinskia at gcc dot gnu dot org  2006-01-27 20:59 
---
Fixed in 4.1.0.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.1.0


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-25 Thread eedelman at gcc dot gnu dot org


--- Comment #17 from eedelman at gcc dot gnu dot org  2006-01-25 20:46 
---
Subject: Bug 25716

Author: eedelman
Date: Wed Jan 25 20:46:29 2006
New Revision: 110225

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110225
Log:
fortran/
2005-01-25  Erik Edelmann  [EMAIL PROTECTED]

PR fortran/25716
* symbol.c (free_old_symbol): New function.
(gfc_commit_symbols): Use it.
(gfc_commit_symbol): New function.
(gfc_use_derived): Use it.
* gfortran.h: Add prototype for gfc_commit_symbol.
* intrinsic.c (gfc_find_function): Search in 'conversion'
if not found in 'functions'.
(gfc_convert_type_warn): Add a symtree to the new
expression node, and commit the new symtree-n.sym.
* resolve.c (gfc_resolve_index): Make sure typespec is
properly initialized.

testsuite/
2005-01-25  Erik Edelmann  [EMAIL PROTECTED]

PR fortran/25716
* gfortran.dg/char_result_11.f90: Make it sensitive to PR
25716 on 32-bit systems too.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/intrinsic.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/char_result_11.f90


-- 


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-20 Thread pinskia at gcc dot gnu dot org


--- Comment #16 from pinskia at gcc dot gnu dot org  2006-01-20 20:37 
---
(In reply to comment #15)
 Any chance of getting the fix into 4.1?

Yes if someone approves the patch.  Which was posted: 
http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00785.html

I don't know enough of this code to approve it though.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |eedelman at gcc dot gnu dot
   |dot org |org
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2006-
   ||01/msg00785.html
 Status|NEW |ASSIGNED
   Keywords||ice-on-valid-code, patch


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-19 Thread uweigand at gcc dot gnu dot org


--- Comment #15 from uweigand at gcc dot gnu dot org  2006-01-19 23:10 
---
This testcase also fails on s390x-ibm-linux (crash of f951).
The patch in comment 13 fixes the crash.

Any chance of getting the fix into 4.1?


-- 

uweigand at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||uweigand at gcc dot gnu dot
   ||org


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-15 Thread ebotcazou at gcc dot gnu dot org


--- Comment #14 from ebotcazou at gcc dot gnu dot org  2006-01-15 11:30 
---
 Created an attachment (id=10645)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10645action=view) [edit]
 Improved patch

Works For Me(tm).


-- 


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-14 Thread ebotcazou at gcc dot gnu dot org


--- Comment #9 from ebotcazou at gcc dot gnu dot org  2006-01-14 08:22 
---
 Attached a patch that fixes the problem on x86 and a cross-compiler to
 sparc64.  I  intend to contemplate it a bit further before I post it to the
 list for review.

It doesn't seem to work for me (on the 4.1 branch):

Executing on host: /opt/build/eric/gcc-4_1-branch/gcc/testsuite/../gfortran
-B/opt/build/eric/gcc-4_1-branch/gcc/testsuite/../
/home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90   -O
  -pedantic-errors -S  -o char_result_11.s(timeout = 300)
/home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90: In
function 'MAIN__':
/home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:101:error:
void value not ignored as it ought to be
/home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:105:error:
void value not ignored as it ought to be
/home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:107:error:
void value not ignored as it ought to be
/home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:107:error:
void value not ignored as it ought to be

Target: sparc64-sun-solaris2.9
Configured with: /home/eric/svn/gcc-4_1-branch/configure
sparc64-sun-solaris2.9--prefix=/opt/build/eric/local/gcc-4_1-branch
--with-gmp=/opt/build/eric/local --with-mpfr=/opt/build/eric/local
--with-local-prefix=/opt/build/eric/local
--enable-languages=c,c++,objc,obj-c++,java,fortran --disable-multilib
Thread model: posix
gcc version 4.1.0 20060109 (prerelease)


-- 


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-14 Thread eedelman at gcc dot gnu dot org


--- Comment #10 from eedelman at gcc dot gnu dot org  2006-01-14 15:38 
---
(In reply to comment #9)
  Attached a patch that fixes the problem on x86 and a cross-compiler to
  sparc64.  I  intend to contemplate it a bit further before I post it to the
  list for review.
 
 It doesn't seem to work for me (on the 4.1 branch):
 
 Executing on host: /opt/build/eric/gcc-4_1-branch/gcc/testsuite/../gfortran
 -B/opt/build/eric/gcc-4_1-branch/gcc/testsuite/../
 /home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90   
 -O
   -pedantic-errors -S  -o char_result_11.s(timeout = 300)
 /home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90: In
 function 'MAIN__':
 /home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:101:error:
 void value not ignored as it ought to be
 /home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:105:error:
 void value not ignored as it ought to be
 /home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:107:error:
 void value not ignored as it ought to be
 /home/eric/svn/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_result_11.f90:107:error:
 void value not ignored as it ought to be
 

Bummer. Actually, I see that problem as well in my cross compiler.  I must have 
been sloppy in my testing.  I will attach an improved patch shortly.


-- 


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-14 Thread eedelman at gcc dot gnu dot org


--- Comment #11 from eedelman at gcc dot gnu dot org  2006-01-14 15:40 
---
Created an attachment (id=10640)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10640action=view)
Improved patch


-- 

eedelman at gcc dot gnu dot org changed:

   What|Removed |Added

  Attachment #10639|0   |1
is obsolete||


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-14 Thread ebotcazou at gcc dot gnu dot org


--- Comment #12 from ebotcazou at gcc dot gnu dot org  2006-01-14 17:25 
---
 Created an attachment (id=10640)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10640action=view) [edit]
 Improved patch

The testsuite is now clean again, both on 32-bit and 64-bit SPARC.  Thanks!


-- 


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-14 Thread eedelman at gcc dot gnu dot org


--- Comment #13 from eedelman at gcc dot gnu dot org  2006-01-14 23:22 
---
Created an attachment (id=10645)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10645action=view)
Improved patch

After some more testing, I found out that the previous patch still failed in
some cases.


-- 

eedelman at gcc dot gnu dot org changed:

   What|Removed |Added

  Attachment #10640|0   |1
is obsolete||


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-13 Thread eedelman at gcc dot gnu dot org


--- Comment #8 from eedelman at gcc dot gnu dot org  2006-01-14 00:12 
---
Created an attachment (id=10639)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10639action=view)
Patch to fix the bug.

Attached a patch that fixes the problem on x86 and a cross-compiler to sparc64.
 I  intend to contemplate it a bit further before I post it to the list for
review.


-- 


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



[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-10 Thread eedelman at gcc dot gnu dot org


--- Comment #1 from eedelman at gcc dot gnu dot org  2006-01-10 12:32 
---
According to the mail http://gcc.gnu.org/ml/fortran/2006-01/msg00123.html, it
fails on x86-64 and SPARC64 too.  I don't see the error on Linux/x86.


-- 

eedelman at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||eedelman at gcc dot gnu dot
   ||org


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




[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-10 Thread ebotcazou at gcc dot gnu dot org


--- Comment #2 from ebotcazou at gcc dot gnu dot org  2006-01-10 12:48 
---
I see it on SPARC64 and x86-64.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  GCC build triplet|hppa64-hp-hpux11.11 |64-bit platform
   GCC host triplet|hppa64-hp-hpux11.11 |64-bit platform
 GCC target triplet|hppa64-hp-hpux11.11 |64-bit platform
   Last reconfirmed|-00-00 00:00:00 |2006-01-10 12:48:29
   date||


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




[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-10 Thread toon at moene dot indiv dot nluug dot nl


--- Comment #3 from toon at moene dot indiv dot nluug dot nl  2006-01-10 
13:04 ---
Also, very telling, it fails for s390x-ibm-linux-gnu (64 bits) and *not* for
s390-ibm-linux-gnu (32 bits).


-- 


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




[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-10 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2006-01-10 13:08 ---
I can reproduce it with a native compiler for powerpc-darwin but with -m64
which enables LP64 powerpc-Darwin.  It is a segfault writting out the module.
Backtrace:
#0  0x00052ce0 in mio_symtree_ref (stp=0x42909e3c) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:2115
#1  0x00053898 in mio_expr (ep=0x42909ef0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:2546
#2  0x00052424 in mio_array_ref (ar=0x42909ea4) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:1809
#3  0x0005310c in mio_ref (rp=0xb4a0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:2257
#4  0x000531e0 in mio_ref_list (rp=0x42909df0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:2286
#5  0x000539e4 in mio_expr (ep=0x42909bb0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:2582
#6  0x00052054 in mio_charlen (clp=0x4290873c) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:1668
#7  0x00052200 in mio_typespec (ts=0x42908730) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:1726
#8  0x00053fc4 in mio_symbol (sym=0x42908720) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:2802
#9  0x00055270 in write_symbol (n=13, sym=0x42908720) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:3468
#10 0x000553dc in write_symbol0 (st=0x429087a0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:3507
#11 0x000552c8 in write_symbol0 (st=0x42908840) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:3486
#12 0x000552d4 in write_symbol0 (st=0x429085f0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:3487
#13 0x000552c8 in write_symbol0 (st=0x429016c0) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:3486
#14 0x000552c8 in write_symbol0 (st=0x42907780) at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:3486
#15 0x000558e4 in write_module () at
/Users/pinskia/src/gcc/alias/gcc/gcc/fortran/module.c:3653


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
  GCC build triplet|64-bit platform |
   GCC host triplet|64-bit platform |


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




[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-10 Thread fengwang at gcc dot gnu dot org


--- Comment #5 from fengwang at gcc dot gnu dot org  2006-01-11 03:18 
---
Also fails on ia64-linux-gnu. This is the ruduced case:

module cutils
 implicit none
 private
 type t
   integer :: kk(3) = (/30, 40, 50 /)
 end type t
 integer :: n8 = 3
 type(t) :: tt2
 public :: IntToChar7
 contains
   function IntToChar7(integerValue) result(a)
 integer, intent(in) :: integerValue
 character(len=tt2%kk(n8))  :: a
 write(a, *) integerValue
   end function IntToChar7
end module cutils
program test
use cutils
end program test

And the dumped parse tree:

Namespace: A-Z: (UNKNOWN 0)
procedure name = cutils
symtree: n8  Ambig 0
symbol n8 (INTEGER 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC)
value: 3

symtree: cutils  Ambig 0
symbol cutils (UNKNOWN 0)(MODULE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC)

symtree: inttochar7  Ambig 0
symbol inttochar7 (CHARACTER cutils:tt2 %
kk(__convert_i4_i8[[((cutils:n8))]]))(PROCEDURE UNKNOWN-INTENT PUBLIC
MODULE-PROC FUNCTION)
result: a
Formal arglist: integervalue

symtree: t  Ambig 0
symbol t (UNKNOWN 0)(DERIVED UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC)
components: (kk (INTEGER 4) DIMENSION (1 AS_EXPLICIT 1 3 ))

symtree: tt2  Ambig 0
symbol tt2 (DERIVED t)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC)
value: t((/ 30 , 40 , 50 /))



CONTAINS

  Namespace: A-Z: (UNKNOWN 0)
  procedure name = inttochar7
  symtree: a  Ambig 0
  symbol a (CHARACTER cutils:tt2 %
kk(__convert_i4_i8[[((cutils:n8))]]))(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC RESULT)

  symtree: integervalue  Ambig 0
  symbol integervalue (INTEGER 4)(VARIABLE IN UNKNOWN-ACCESS
UNKNOWN-PROC DUMMY)

  symtree: inttochar7  Ambig 0 from namespace cutils

  WRITE UNIT=inttochar7:a FMT=-1
TRANSFER inttochar7:integervalue
  DT_END

char_result_11.f90:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.


Please note that symbol inttochar7 (CHARACTER cutils:tt2 %
kk(__convert_i4_i8[[((cutils:n8))]]))
I think it's the conversion that triggers the ICE. And If I use literal
constant 3 instead of n8 in the fortran source code, it will be passed.


-- 

fengwang at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||fengwang at gcc dot gnu dot
   ||org


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




[Bug fortran/25716] FAIL: gfortran.dg/char_result_11.f90 -O (test for excess errors)

2006-01-10 Thread fengwang at gcc dot gnu dot org


--- Comment #6 from fengwang at gcc dot gnu dot org  2006-01-11 03:38 
---
And the backtrace:
#0  mio_expr (ep=0x60033298)
at ../../gcc-4.2-20051231/gcc/fortran/module.c:1472
#1  0x4007caa0 in mio_charlen (clp=0x600fc0a8)
at ../../gcc-4.2-20051231/gcc/fortran/module.c:1668
#2  0x4007d5c0 in mio_typespec (ts=0x600fc098)
at ../../gcc-4.2-20051231/gcc/fortran/module.c:1726
#3  0x4007b9d0 in mio_expr (ep=0x600fc778)
at ../../gcc-4.2-20051231/gcc/fortran/module.c:2502
#4  0x4007d060 in mio_ref (rp=Variable rp is not available.
)
at ../../gcc-4.2-20051231/gcc/fortran/module.c:1809
#5  0x4007d500 in mio_ref_list (rp=0x600fc428)

in mio_charlen function, it run into
if (iomode == IO_OUTPUT)
1665{
1666  cl = *clp;
(gdb)
1667  if (cl != NULL)
1668mio_expr (cl-length);  ICE HERE!
1669}

(gdb) p *cl
$7 = {length = 0x1, next = 0x0, backend_decl = 0x0, resolved = 0}

The character length is an expression, not a constant integer.


-- 


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