[Bug fortran/35937] Wrong type for charlength of function

2008-12-14 Thread pault at gcc dot gnu dot org
--- Comment #21 from pault at gcc dot gnu dot org 2008-12-14 16:11 --- Fixed on trunk and 4.3. Thanks for the report. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added --

[Bug fortran/35937] Wrong type for charlength of function

2008-12-14 Thread pault at gcc dot gnu dot org
--- Comment #20 from pault at gcc dot gnu dot org 2008-12-14 16:09 --- Subject: Bug 35937 Author: pault Date: Sun Dec 14 16:07:46 2008 New Revision: 142751 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142751 Log: 2008-12-14 Paul Thomas PR fortran/35937 * tr

[Bug fortran/35937] Wrong type for charlength of function

2008-12-14 Thread pault at gcc dot gnu dot org
--- Comment #19 from pault at gcc dot gnu dot org 2008-12-14 16:01 --- Subject: Bug 35937 Author: pault Date: Sun Dec 14 16:00:25 2008 New Revision: 142750 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142750 Log: 2008-12-14 Paul Thomas PR fortran/35937 * tr

[Bug fortran/35937] Wrong type for charlength of function

2008-12-11 Thread fxcoudert at gcc dot gnu dot org
--- Comment #18 from fxcoudert at gcc dot gnu dot org 2008-12-11 10:39 --- (In reply to comment #17) > var = gfc_create_var (TREE_TYPE (expr), NULL); > > is replaced with > > + tree tmp = gfc_create_var (gfc_charlen_type_node, "slength"); > > Has "slength" any chance to

[Bug fortran/35937] Wrong type for charlength of function

2008-12-11 Thread dominiq at lps dot ens dot fr
--- Comment #17 from dominiq at lps dot ens dot fr 2008-12-11 10:00 --- > Hah! My VMware Fedora catches the bug and demonstrates that my simple fix of > comment #5 does the job; ie. unconditionally do the constant fold to a > gfc_charlen_type_node. This can never do any harm! I have lo

[Bug fortran/35937] Wrong type for charlength of function

2008-12-11 Thread pault at gcc dot gnu dot org
--- Comment #16 from pault at gcc dot gnu dot org 2008-12-11 09:38 --- Hah! My VMware Fedora catches the bug and demonstrates that my simple fix of comment #5 does the job; ie. unconditionally do the constant fold to a gfc_charlen_type_node. This can never do any harm! I will fix it as

[Bug fortran/35937] Wrong type for charlength of function

2008-12-10 Thread dominiq at lps dot ens dot fr
--- Comment #15 from dominiq at lps dot ens dot fr 2008-12-10 19:15 --- No regression also on powerpc-apple-darwin9 (patch in comment#4). If I understand the two proposed patches, the only difference is that the FX's one create a temporary if CONSTANT_CLASS_P (se.expr) is not true. Is t

[Bug fortran/35937] Wrong type for charlength of function

2008-12-10 Thread dominiq at lps dot ens dot fr
--- Comment #14 from dominiq at lps dot ens dot fr 2008-12-10 16:18 --- > The patch in comment #5 has a typo and should be: > > se.expr = gfc_evaluate_now (fold_convert (gfc_charlen_type_node, se.expr), > &se.pre); This patch regtested without regression on i686-apple-darwin9. I'll try

[Bug fortran/35937] Wrong type for charlength of function

2008-12-10 Thread dominiq at lps dot ens dot fr
--- Comment #13 from dominiq at lps dot ens dot fr 2008-12-10 15:17 --- In comment #11, I wrote: > I have applied the proposed patches in comment #4 and #5 (one at a time!-), > but > they don't fix the wrong code (note also that gfortran with patch #4 pass the > test suite without regre

[Bug fortran/35937] Wrong type for charlength of function

2008-12-02 Thread pault at gcc dot gnu dot org
--- Comment #12 from pault at gcc dot gnu dot org 2008-12-03 05:52 --- (In reply to comment #11) > Did you get the expected result also? > I couldn't tell - I did not have the 32 bit library installed. I'll try to fix that. Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.c

[Bug fortran/35937] Wrong type for charlength of function

2008-12-02 Thread dominiq at lps dot ens dot fr
--- Comment #11 from dominiq at lps dot ens dot fr 2008-12-02 20:03 --- On powerpc-apple-darwin9, the test in comment #4 returns 0 with -m32 (no bus error) instead of 1 with -m64. I have applied the proposed patches in comment #4 and #5 (one at a time!-), but they don't fix the wrong co

[Bug fortran/35937] Wrong type for charlength of function

2008-11-30 Thread pault at gcc dot gnu dot org
--- Comment #10 from pault at gcc dot gnu dot org 2008-11-30 13:13 --- (In reply to comment #9) > I might as well take it too:-) Since I cannot reproduce the bug, even at -m32, I am unassigning myself. Paul -- pault at gcc dot gnu dot org changed: What|Removed

[Bug fortran/35937] Wrong type for charlength of function

2008-11-28 Thread pault at gcc dot gnu dot org
--- Comment #9 from pault at gcc dot gnu dot org 2008-11-28 14:32 --- I might as well take it too:-) Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/35937] Wrong type for charlength of function

2008-11-28 Thread pault at gcc dot gnu dot org
--- Comment #8 from pault at gcc dot gnu dot org 2008-11-28 14:31 --- (In reply to comment #7) > On i686-apple-darwin9, the testcase in comment #4 gives a "Bus error" at -m32 > (rev. 138886). > I'm going to look at this one over this weekend - the bus error with -m32 is wierd:-) Anyhow

[Bug fortran/35937] Wrong type for charlength of function

2008-08-23 Thread fxcoudert at gcc dot gnu dot org
-- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu |org

[Bug fortran/35937] Wrong type for charlength of function

2008-08-08 Thread dominiq at lps dot ens dot fr
--- Comment #7 from dominiq at lps dot ens dot fr 2008-08-08 21:50 --- On i686-apple-darwin9, the testcase in comment #4 gives a "Bus error" at -m32 (rev. 138886). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35937

[Bug fortran/35937] Wrong type for charlength of function

2008-08-08 Thread jv244 at cam dot ac dot uk
--- Comment #6 from jv244 at cam dot ac dot uk 2008-08-08 21:38 --- the testcase in comment #4 is working now. Is the bug still open? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35937

[Bug fortran/35937] Wrong type for charlength of function

2008-07-23 Thread pault at gcc dot gnu dot org
--- Comment #5 from pault at gcc dot gnu dot org 2008-07-23 16:28 --- (In reply to comment #4) Hi FX Your patch looks fine to me. In particular, you have tackled it at the right place. However, I have a question: why is this not sufficient? se.expr = gfc_evaluate_now (fold_convert (g

[Bug fortran/35937] Wrong type for charlength of function

2008-05-12 Thread fxcoudert at gcc dot gnu dot org
-- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot |dot org

[Bug fortran/35937] Wrong type for charlength of function

2008-05-12 Thread fxcoudert at gcc dot gnu dot org
-- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu |org

[Bug fortran/35937] Wrong type for charlength of function

2008-05-12 Thread fxcoudert at gcc dot gnu dot org
-- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot |dot org

[Bug fortran/35937] Wrong type for charlength of function

2008-05-12 Thread fxcoudert at gcc dot gnu dot org
--- Comment #4 from fxcoudert at gcc dot gnu dot org 2008-05-12 17:44 --- It's not an issue limited to SCAN, it can happen to all functions (intrinsics or not). Reduced testcase, showing the failure even without -fdefault-integer-8: program main implicit none print *, len(f5('1'))