[Bug fortran/44110] New: [4.6 Regression] FAIL: gfortran.dg/proc_ptr_23.f90 -O3 -g (test for excess errors) etc

2010-05-13 Thread janus at gcc dot gnu dot org
AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44110

[Bug fortran/43207] [OOP] ICE for class pointer = null() initialization

2010-05-13 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-05-13 14:47 --- (In reply to comment #0) fff.f90:26:0: internal compiler error: in gfc_conv_structure, at fortran/trans-expr.c:4390 It turns out this ICE is actually due to the NULL() initialization of the class pointer and has

[Bug fortran/43207] [OOP] ICE for class pointer = null() initialization

2010-05-13 Thread janus at gcc dot gnu dot org
--- Comment #4 from janus at gcc dot gnu dot org 2010-05-13 14:55 --- When removing the NULL initialization in comment #3, the dump shows: static struct .class.parent.p this = {.$data=0B}; Zeroing the $data pointer is probably not needed without NULL initialization. With NULL

[Bug fortran/44044] [OOP] SELECT TYPE with class-valued function

2010-05-10 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-05-10 12:54 --- Subject: Bug 44044 Author: janus Date: Mon May 10 12:54:25 2010 New Revision: 159217 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159217 Log: 2010-05-10 Janus Weil ja...@gcc.gnu.org PR fortran

[Bug fortran/44064] [OOP] ICE with file containing two modules and one program

2010-05-10 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-05-10 21:59 --- For me, compiling the code in comment #0 in a single file seems to get stuck in an endless loop (trunk rev. 159217 on x86_64-unknown-linux-gnu). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44064

[Bug fortran/44065] [OOP] Undefined reference to TBP

2010-05-10 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-05-10 22:06 --- Confirmed. Compiling via ... gfortran-4.6 -c module.f90 gfortran-4.6 test.f90 ... works, though. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/44047] New: [OOP] SELECT TYPE with associate-name and allocatable selector

2010-05-09 Thread janus at gcc dot gnu dot org
selector Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus

[Bug fortran/44044] [OOP] SELECT TYPE with class-valued function

2010-05-09 Thread janus at gcc dot gnu dot org
-- janus at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org

[Bug fortran/44044] New: [OOP] SELECT TYPE with class-valued function

2010-05-08 Thread janus at gcc dot gnu dot org
Version: 4.6.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla

[Bug fortran/44044] [OOP] SELECT TYPE with class-valued function

2010-05-08 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-05-08 20:13 --- Side note: Invalid code like function fun() class(t1) :: fun end function is not rejected, although the polymorphic 'fun' is neither a pointer, allocatable nor a dummy. -- http://gcc.gnu.org/bugzilla

[Bug fortran/44044] [OOP] SELECT TYPE with class-valued function

2010-05-08 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-05-08 20:20 --- Bonus feature #1: Adding this to comment #0 ... select type ( y = fun(0) ) type is (t1) print *,t1 type is (t2) print *,t2 class default print *,default end select ... should give a runtime error, since fun(0

[Bug fortran/44044] [OOP] SELECT TYPE with class-valued function

2010-05-08 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-05-08 20:23 --- Bonus feature #2: select type ( y = fun(1) ) type is (t1) y%i = 1 type is (t2) y%i = 2 end select ... should be rejected, due to (F08): C836 (R847) If selector is not a variable or is a variable that has

[Bug fortran/43696] [OOP] Bogus error: Passed-object dummy argument must not be POINTER

2010-05-05 Thread janus at gcc dot gnu dot org
--- Comment #7 from janus at gcc dot gnu dot org 2010-05-05 07:45 --- Subject: Bug 43696 Author: janus Date: Wed May 5 07:44:33 2010 New Revision: 159056 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159056 Log: 2010-05-05 Janus Weil ja...@gcc.gnu.org PR fortran

[Bug fortran/43986] [OOP] gfortran.dg/dynamic_dispatch_4.f03 doesn't work on Linux/ia64

2010-05-05 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-05-05 08:12 --- Works for me on x86_64-unknown-linux-gnu. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43696] [OOP] Bogus error: Passed-object dummy argument must not be POINTER

2010-05-05 Thread janus at gcc dot gnu dot org
--- Comment #8 from janus at gcc dot gnu dot org 2010-05-05 08:13 --- Fixed with r159056. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43990] New: [OOP] ICE in output_constructor_regular_field, at varasm.c:4995

2010-05-05 Thread janus at gcc dot gnu dot org
: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43990

[Bug fortran/43986] [OOP] gfortran.dg/dynamic_dispatch_4.f03 doesn't work on Linux/ia64

2010-05-05 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-05-05 13:07 --- It also works on x86_64-apple-darwin10.3.0. Does the failure on ia64 only happen with -O3? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43986

[Bug fortran/43696] [OOP] Bogus error: Passed-object dummy argument must not be POINTER

2010-05-03 Thread janus at gcc dot gnu dot org
--- Comment #6 from janus at gcc dot gnu dot org 2010-05-03 20:03 --- Mine. I think fixing comment #0 is as easy as the following two-liner: Index: gcc/fortran/symbol.c === --- gcc/fortran/symbol.c(revision 158970

[Bug fortran/43896] [OOP][fortran-dev Regression] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-27 Thread janus at gcc dot gnu dot org
--- Comment #10 from janus at gcc dot gnu dot org 2010-04-27 07:38 --- Subject: Bug 43896 Author: janus Date: Tue Apr 27 07:38:06 2010 New Revision: 158767 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158767 Log: 2010-04-27 Janus Weil ja...@gcc.gnu.org PR fortran

[Bug fortran/43896] [OOP] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-27 Thread janus at gcc dot gnu dot org
--- Comment #11 from janus at gcc dot gnu dot org 2010-04-27 07:41 --- The commit in comment #10 fixes the fortran-dev regression, but not the original problem in comment #0. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43896] [OOP] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-27 Thread janus at gcc dot gnu dot org
--- Comment #15 from janus at gcc dot gnu dot org 2010-04-27 21:40 --- I've reduced the test case to the bare minimum required to trigger the ICE: module m_rotation_matrix type t_rotation_matrix end type contains function rotation_matrix_times_vector( left ) result(res

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-26 Thread janus at gcc dot gnu dot org
--- Comment #36 from janus at gcc dot gnu dot org 2010-04-26 09:08 --- Subject: Bug 42274 Author: janus Date: Mon Apr 26 09:07:26 2010 New Revision: 158721 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158721 Log: 2010-04-26 Janus Weil ja...@gcc.gnu.org PR fortran

[Bug fortran/43895] [fortran-dev] internal compiler error: verify_ssa failed

2010-04-26 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-04-26 14:56 --- Note: There is another OOP PR which fails only with optimization: PR41753. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43895

[Bug fortran/43895] [OOP] internal compiler error: verify_ssa failed

2010-04-26 Thread janus at gcc dot gnu dot org
--- Comment #4 from janus at gcc dot gnu dot org 2010-04-26 15:04 --- Confirmed. It seems this fails already with the 4.5 release as well as with current trunk, which means that it's not specific to the fortran-dev branch. -- janus at gcc dot gnu dot org changed: What

[Bug fortran/43896] [OOP] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-26 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-04-26 17:33 --- Confirmed. The ICE happens with 4.5, trunk and fortran-dev. Thanks for the report! -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43896] [fortran-dev Regression] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-26 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-04-26 19:10 --- (In reply to comment #3) The ICE happens with 4.5, trunk and fortran-dev. Actually this is only half-true. With fortran-dev one already gets an ICE on the first file, which is different from the one reported

[Bug fortran/43896] [fortran-dev Regression] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-26 Thread janus at gcc dot gnu dot org
--- Comment #6 from janus at gcc dot gnu dot org 2010-04-26 19:33 --- Here is a reduced test case for the fortran-dev failure, which turns out to be pretty trivial. All it takes is an array-valued TBP (wonder if we don't have such a thing in the testsuite already): module

[Bug fortran/43896] [fortran-dev Regression] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-26 Thread janus at gcc dot gnu dot org
--- Comment #8 from janus at gcc dot gnu dot org 2010-04-26 20:40 --- Ok, here is a preliminary patch which fixes the fortran-dev problem: Index: gcc/fortran/symbol.c === --- gcc/fortran/symbol.c(revision 158741

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #17 from janus at gcc dot gnu dot org 2010-04-25 14:32 --- Created an attachment (id=20482) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20482action=view) patch v2 The attached patch extends the one in comment #7, fixing all regressions related to non-generic TBPs

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #18 from janus at gcc dot gnu dot org 2010-04-25 14:42 --- Here is a maximally reduced version of comment #8 example 2, which still fails with the patch in comment #17: module m type :: t1 contains procedure :: make_integer generic :: extract = make_integer

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #19 from janus at gcc dot gnu dot org 2010-04-25 14:56 --- Created an attachment (id=20484) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20484action=view) patch v3 Here is an updated patch, which fixes (among others) comment #8 example 2 and comment #18. The remaining

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #22 from janus at gcc dot gnu dot org 2010-04-25 16:43 --- (In reply to comment #21) /opt/gcc/work/gcc/testsuite/gfortran.dg/typebound_operator_3.f03:84:0: internal compiler error: Segmentation fault Yes, I can confirm that: typebound_operator_{3,4}.f03 both fail

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #23 from janus at gcc dot gnu dot org 2010-04-25 17:09 --- Created an attachment (id=20485) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20485action=view) patch v4 The attached update of the patch removes the ICEs in typebound_operator_{3,4}.f03. -- http

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #24 from janus at gcc dot gnu dot org 2010-04-25 17:16 --- (In reply to comment #20) My suspicion, which is strengthened by the remaining regressions for version 3 of your fix, is that the generic components of the vtab should not be marked as ppc. I have been tempted

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #25 from janus at gcc dot gnu dot org 2010-04-25 18:23 --- I just did a full testsuite run, verifying that dynamic_dispatch_{1-3}.f03 are indeed the only failures with the patch in comment #23. This means that, if we can fix the failure in comment #24, the branch will most

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #30 from janus at gcc dot gnu dot org 2010-04-25 19:50 --- (In reply to comment #29) (In reply to comment #27) Created an attachment (id=20486) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20486action=view) [edit] Tried this patch: compilation goes past

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #31 from janus at gcc dot gnu dot org 2010-04-25 20:17 --- Ok, back to fixing the remaining regression, namely comment #24. Compiling this with and without the patch in comment #23 shows the following difference: --- c24.dump.unpatched 2010-04-25 22:03:44.418204091 +0200

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #33 from janus at gcc dot gnu dot org 2010-04-25 21:44 --- Created an attachment (id=20488) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20488action=view) patch v5 The attached version of the patch clears the failures of dynamic_dispatch_{1-3}.f03. It is free

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-25 Thread janus at gcc dot gnu dot org
--- Comment #34 from janus at gcc dot gnu dot org 2010-04-25 22:26 --- (In reply to comment #33) Will do a full testsuite run now. The testsuite completed cleanly, without any failures. Paul, if you agree that this patch is ok, I can commit it tomorrow. -- http://gcc.gnu.org

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-22 Thread janus at gcc dot gnu dot org
--- Comment #16 from janus at gcc dot gnu dot org 2010-04-22 20:58 --- For completeness, here is a reduced/modified version of the original test case in comment #1: module mod_A type :: t1 contains procedure,nopass :: fun end type contains logical function fun() end

[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components

2010-04-20 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-04-20 12:26 --- (In reply to comment #4) Technically this PR, fixed on trunk but not on fortran-dev, is now a [fortran-dev Regression]. Could it be marked that way? Yes. -- janus at gcc dot gnu dot org changed

[Bug fortran/43492] [fortran-dev Regression] ICE in gfc_add_component_ref, at fortran/expr.c:352

2010-04-20 Thread janus at gcc dot gnu dot org
--- Comment #4 from janus at gcc dot gnu dot org 2010-04-20 20:51 --- Further reduced test case: module base_mod type :: base_mat contains procedure :: transp1 = base_transp1 generic :: transp = transp1 end type base_mat contains subroutine base_transp1

[Bug fortran/43492] [fortran-dev Regression] ICE in gfc_add_component_ref, at fortran/expr.c:352

2010-04-20 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-04-20 21:56 --- Here is a preliminary patch: Index: gcc/fortran/resolve.c === --- gcc/fortran/resolve.c (revision 158513) +++ gcc/fortran/resolve.c (working

[Bug fortran/43492] [fortran-dev Regression] ICE in gfc_add_component_ref, at fortran/expr.c:352

2010-04-19 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-04-19 11:07 --- Confirmed. Backtrace: #0 gfc_add_component_ref (e=0x17cb5e0, name=0x77f2fe70 base_transp1) at /home/jweil/gcc46/fortran-dev/gcc/fortran/expr.c:703 #1 0x00528306 in resolve_class_typebound_call (code

[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr

2010-04-19 Thread janus at gcc dot gnu dot org
--- Comment #11 from janus at gcc dot gnu dot org 2010-04-19 12:51 --- (In reply to comment #10) AFAICR the problem is specific to the fortran-dev branch. No, this is definitely not the case! Only the failure of comment #0 is specific to the branch. However, this failure is caused

[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr

2010-04-19 Thread janus at gcc dot gnu dot org
--- Comment #13 from janus at gcc dot gnu dot org 2010-04-19 13:21 --- I keep forgetting this test!-(on i686-apple-darwin9, it compiles at revision 147438, 20090512, and fails at revision 150825, 20090817). That's a start. I can see two (hypothetical) candidates in this range

[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr

2010-04-19 Thread janus at gcc dot gnu dot org
--- Comment #14 from janus at gcc dot gnu dot org 2010-04-19 13:46 --- (In reply to comment #13) I keep forgetting this test!-(on i686-apple-darwin9, it compiles at revision 147438, 20090512, and fails at revision 150825, 20090817). That's a start. I can see two (hypothetical

[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr

2010-04-19 Thread janus at gcc dot gnu dot org
--- Comment #17 from janus at gcc dot gnu dot org 2010-04-19 18:47 --- (In reply to comment #16) I think the culprit is: Date: Sat Jul 25 11:56:35 2009 New Revision: 150078 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=150078 Close, but not quite :) It's actually r150047

[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr

2010-04-19 Thread janus at gcc dot gnu dot org
--- Comment #21 from janus at gcc dot gnu dot org 2010-04-19 21:34 --- (In reply to comment #20) Created an attachment (id=20429) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20429action=view) [edit] A provisional fix for the PR Yes, the following parts are approved (they're

[Bug fortran/43227] [4.5 Regression] ICE: segmentation fault in mio_expr

2010-04-18 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-04-18 11:09 --- It turns out this problem is not specific to the OOP stuff on fortran-dev, but instead is due to an underlying problem with PROCEDURE statements (which affects procedure pointers as well as PPCs), demonstrated

[Bug fortran/42353] [fortran-dev] Bogus Error: Name 'vtype$...' at (1) is an ambiguous reference ...

2010-04-18 Thread janus at gcc dot gnu dot org
--- Comment #26 from janus at gcc dot gnu dot org 2010-04-18 13:13 --- (In reply to comment #25) A provisional fix for this PR Actually, what's the issue here? At rev. 158483 the fortran-dev testsuite runs cleanly on x86_64-unknown-linux-gnu, and the test cases in this PR (gfcbug96

[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr

2010-04-18 Thread janus at gcc dot gnu dot org
--- Comment #6 from janus at gcc dot gnu dot org 2010-04-18 16:42 --- (In reply to comment #5) What about pr42274? Is it a duplicate or not? I don't think so. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227

[Bug fortran/43227] [fortran-dev Regression] ICE: segmentation fault in mio_expr

2010-04-15 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-04-15 21:30 --- Here is a reduced test case, which ICEs with the same backtrace: module m_string type t_string character, dimension(:), allocatable :: string contains procedure :: char = string_to_char end type

[Bug fortran/43696] [OOP] Bogus error: Passed-object dummy argument must not be POINTER

2010-04-12 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-04-12 09:50 --- (In reply to comment #4) I've tried to isolate the error message from the ICE. The smallest code is a_module for the error and b_module for the ICE. Thanks. However, ... !!$ f951: internal compiler error

[Bug fortran/43696] New: [OOP] Bogus error: Passed-object dummy argument must not be POINTER

2010-04-08 Thread janus at gcc dot gnu dot org
Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43696

[Bug fortran/43696] [OOP] Bogus error: Passed-object dummy argument must not be POINTER

2010-04-08 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-04-08 21:11 --- Forgot to mention: This one was reported by Hans-Werner Boschmann (thanks!). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43696

[Bug fortran/43291] [4.5 regression] [OOP] Type mismatch in argument; passed CLASS(t1) to CLASS(t2)

2010-03-10 Thread janus at gcc dot gnu dot org
--- Comment #11 from janus at gcc dot gnu dot org 2010-03-10 20:46 --- (In reply to comment #6) If all appears to be well with the regtest and I do not hear back from you, I will commit the patch to trunk tonight. The patch clobbers dynamic_dispatch_4.f03. Hm, funny. For me

[Bug fortran/43326] New: [OOP] dynamic dispatch with CLASS components

2010-03-10 Thread janus at gcc dot gnu dot org
Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http

[Bug fortran/43291] [4.5 regression] [OOP] Type mismatch in argument; passed CLASS(t1) to CLASS(t2)

2010-03-10 Thread janus at gcc dot gnu dot org
--- Comment #12 from janus at gcc dot gnu dot org 2010-03-10 21:04 --- (In reply to comment #10) In preparing a testcase, I foolishly decided to check the original for correct execution. The following gives the wrong result: I guess this is worth a separate PR. It's PR43326 now

[Bug fortran/43326] [OOP] dynamic dispatch with CLASS components

2010-03-10 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-03-10 22:06 --- Here is a simple-minded patch: Index: gcc/fortran/resolve.c === --- gcc/fortran/resolve.c (revision 157366) +++ gcc/fortran/resolve.c

[Bug fortran/43326] [OOP] dynamic dispatch with CLASS components

2010-03-10 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-03-10 22:50 --- (In reply to comment #1) This fixes the test case. Haven't tested for regressions yet. Regtest was successful. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43326

[Bug fortran/43291] [4.5 regression] [OOP] Type mismatch in argument; passed CLASS(t1) to CLASS(t2)

2010-03-09 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-03-09 09:44 --- The problem here is that when resolving a polymorphic TBP call, we resolve the call for each member of the CLASS (i.e. the declared type and all its children, cf. 'resolve_class_compcall'). In 'check_class_members' we

[Bug fortran/43291] [4.5 regression] [OOP] Type mismatch in argument; passed CLASS(t1) to CLASS(t2)

2010-03-09 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-03-09 09:49 --- (In reply to comment #2) The problem here is that when resolving a polymorphic TBP call, we resolve the call for each member of the CLASS (i.e. the declared type and all its children, cf. 'resolve_class_compcall

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-08 Thread janus at gcc dot gnu dot org
--- Comment #10 from janus at gcc dot gnu dot org 2010-03-08 09:35 --- Subject: Bug 43256 Author: janus Date: Mon Mar 8 09:35:04 2010 New Revision: 157272 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157272 Log: 2010-03-08 Janus Weil ja...@gcc.gnu.org PR fortran

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-08 Thread janus at gcc dot gnu dot org
--- Comment #11 from janus at gcc dot gnu dot org 2010-03-08 09:37 --- Fixed with r157272. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/42769] ICE in resolve_typebound_procedure

2010-03-08 Thread janus at gcc dot gnu dot org
--- Comment #18 from janus at gcc dot gnu dot org 2010-03-08 15:43 --- (In reply to comment #17) At revision 157277, I no longer see the ICE, but a bunch of errors: pr42769.f90:5063.10: res = a%a%csnmi() 1 Error: Type mismatch in argument 'a' at (1); passed CLASS

[Bug fortran/43291] New: [4.5 regression] [OOP] Type mismatch in argument; passed CLASS(t1) to CLASS(t2)

2010-03-08 Thread janus at gcc dot gnu dot org
: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43291

[Bug fortran/42769] ICE in resolve_typebound_procedure

2010-03-08 Thread janus at gcc dot gnu dot org
--- Comment #20 from janus at gcc dot gnu dot org 2010-03-08 15:50 --- (In reply to comment #18) I will open a new PR for this. This is now PR 43291. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42769

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-07 Thread janus at gcc dot gnu dot org
--- Comment #8 from janus at gcc dot gnu dot org 2010-03-07 14:07 --- (In reply to comment #7) This leaves us with the following regressions: FAIL: gfortran.dg/dynamic_dispatch_1.f03 -O0 (test for excess errors) FAIL: gfortran.dg/dynamic_dispatch_3.f03 -O0 (test for excess

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-05 Thread janus at gcc dot gnu dot org
--- Comment #6 from janus at gcc dot gnu dot org 2010-03-05 09:36 --- (In reply to comment #5) All of these throw error messages like ABSTRACT INTERFACE '...' must not be referenced at (1) This was PR41873 and was fixed by querying expr-value.function.name, which fails now. We

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-05 Thread janus at gcc dot gnu dot org
--- Comment #7 from janus at gcc dot gnu dot org 2010-03-05 09:56 --- (In reply to comment #6) ABSTRACT INTERFACE '...' must not be referenced at (1) This was PR41873 and was fixed by querying expr-value.function.name, which fails now. We should find a better way to silence

[Bug fortran/43244] Invalid statement misinterpreted as FINAL declaration

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #7 from janus at gcc dot gnu dot org 2010-03-04 09:17 --- (In reply to comment #6) Without looking at the code yet, the matcher must see a space or double colon after the word FINAL before matching it. If it sees anything else, its a MATCH_NO not a MATCH_ERROR

[Bug fortran/43244] Invalid statement misinterpreted as FINAL declaration

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #10 from janus at gcc dot gnu dot org 2010-03-04 10:35 --- (In reply to comment #9) From: F2003, 3.3.2 Fixed source form: Except in a character context, blanks are insignificant and may be used freely throughout the program. I guess this is what triggered the famous quote

[Bug fortran/43244] Invalid statement misinterpreted as FINAL declaration

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #12 from janus at gcc dot gnu dot org 2010-03-04 12:06 --- (In reply to comment #11) I think it dates back to punch cards; Yes, I've seen those. However, being born too late, I never had the chance to use them :) I wouldn't expect anyone to use F03 FINAL statements

[Bug fortran/43244] Invalid statement misinterpreted as FINAL declaration

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #14 from janus at gcc dot gnu dot org 2010-03-04 13:42 --- Subject: Bug 43244 Author: janus Date: Thu Mar 4 13:42:06 2010 New Revision: 157226 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157226 Log: 2010-03-04 Janus Weil ja...@gcc.gnu.org PR fortran

[Bug fortran/43244] Invalid statement misinterpreted as FINAL declaration

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #15 from janus at gcc dot gnu dot org 2010-03-04 13:58 --- Fixed with r157226. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43256] New: [OOP] character-valued TBP with missing optional arg

2010-03-04 Thread janus at gcc dot gnu dot org
Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla

[Bug fortran/43256] [OOP] character-valued TBP with missing optional arg

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-03-04 16:04 --- (In reply to comment #0) Apparently this only happens for type-bound character-valued functions (but not for subroutines or e.g. integer-valued functions). Actually that is wrong. It does work with subroutines

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-03-04 16:11 --- Btw, I just checked an analogous example with a procedure pointer component instead of a type-bound procedure, and this works. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43256

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-03-04 21:14 --- Ok, think I got it. It's a one-liner: Index: gcc/fortran/resolve.c === --- gcc/fortran/resolve.c (revision 157225) +++ gcc/fortran/resolve.c

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #4 from janus at gcc dot gnu dot org 2010-03-04 22:10 --- (In reply to comment #3) Hope this produces no regressions. Unfortunately it does :( FAIL: gfortran.dg/dynamic_dispatch_1.f03 -O0 (test for excess errors) FAIL: gfortran.dg/dynamic_dispatch_3.f03 -O0 (test

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-04 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-03-04 22:44 --- (In reply to comment #4) FAIL: gfortran.dg/dynamic_dispatch_1.f03 -O0 (test for excess errors) FAIL: gfortran.dg/dynamic_dispatch_3.f03 -O0 (test for excess errors) FAIL: gfortran.dg/dynamic_dispatch_4.f03 -O0

[Bug fortran/43244] New: statement misinterpreted as FINAL declaration

2010-03-03 Thread janus at gcc dot gnu dot org
Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43244

[Bug fortran/43244] statement misinterpreted as FINAL declaration

2010-03-03 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-03-03 09:49 --- IIRC the parsing of FINAL declarations was implemented by Daniel Kraft. It was committed as r136293. Daniel, could you have a look at this bug? -- janus at gcc dot gnu dot org changed: What|Removed

[Bug fortran/43244] statement misinterpreted as FINAL declaration

2010-03-03 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-03-03 09:54 --- (In reply to comment #0) With so many compilers rejecting it, I wonder: Is it actually legal? I guess not. Changing the line in question to finalstate(1,1:2)%ID = (/1,103/) makes all compilers accept it (including

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-03-03 Thread janus at gcc dot gnu dot org
--- Comment #10 from janus at gcc dot gnu dot org 2010-03-03 15:13 --- Subject: Bug 43169 Author: janus Date: Wed Mar 3 15:12:40 2010 New Revision: 157196 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157196 Log: 2010-03-03 Janus Weil ja...@gcc.gnu.org PR fortran

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-03-03 Thread janus at gcc dot gnu dot org
--- Comment #11 from janus at gcc dot gnu dot org 2010-03-03 15:17 --- Fixed with r157196. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43244] Invalid statement misinterpreted as FINAL declaration

2010-03-03 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-03-03 15:40 --- Quick fix for free form: Index: gcc/fortran/decl.c === --- gcc/fortran/decl.c (revision 157195) +++ gcc/fortran/decl.c (working copy) @@ -7810,6

[Bug fortran/42051] [OOP] ICE on array-valued function with CLASS formal argument

2010-03-02 Thread janus at gcc dot gnu dot org
--- Comment #6 from janus at gcc dot gnu dot org 2010-03-02 23:31 --- Here is another very similar example: implicit none type :: lorenz end type lorenz type(lorenz) :: attractor print *,output(attractor) contains function output(this) result(coordinates) class(lorenz

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-03-01 Thread janus at gcc dot gnu dot org
--- Comment #9 from janus at gcc dot gnu dot org 2010-03-01 12:47 --- Even with the patch from comment #7, another thing goes wrong with BLOCK statements: pure subroutine swap implicit none real :: r1 block real :: r2 r1 = 42. r2 = 43. end block

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-02-25 08:38 --- Confirmed. Here is a reduced test case: pure subroutine swap(x) implicit none type :: myType real :: a end type myType class(myType), intent(inout) :: x select type(x) class is (myType

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-02-25 09:08 --- The problem lies in gfc_impure_variable (resolve.c), where it is checked if the namespace of the variable equals the local namespace of the pure procedure. This check fails if the procedure has sub-namespaces. We

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-02-25 09:13 --- Regarding BLOCK, it seems there is an additional problem: Assignments inside a BLOCK are not checked at all, as the following case shows ... implicit none real :: glob contains pure subroutine swap

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #4 from janus at gcc dot gnu dot org 2010-02-25 09:19 --- Contained procedures are not affected by this bug, since a procedure contained in a pure procedure must itself be pure. Therefore something like this is invalid (as gfortran correctly detects): module m implicit

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-02-25 12:16 --- (In reply to comment #3) Seems like statements inside a BLOCK are not being resolved at all?!? Sorry, this is wrong. They are resolved alright. The problem is just that 'gfc_pure' does not work (checking if we're

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #6 from janus at gcc dot gnu dot org 2010-02-25 12:54 --- (In reply to comment #2) The problem lies in gfc_impure_variable (resolve.c), where it is checked if the namespace of the variable equals the local namespace of the pure procedure. This check fails

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #7 from janus at gcc dot gnu dot org 2010-02-25 13:40 --- (In reply to comment #5) (In reply to comment #3) Seems like statements inside a BLOCK are not being resolved at all?!? Sorry, this is wrong. They are resolved alright. The problem is just that 'gfc_pure' does

[Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670

2010-01-31 Thread janus at gcc dot gnu dot org
--- Comment #21 from janus at gcc dot gnu dot org 2010-01-31 21:56 --- Subject: Bug 42888 Author: janus Date: Sun Jan 31 21:56:02 2010 New Revision: 156418 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=156418 Log: gcc/fortran/ 2010-01-31 Janus Weil ja...@gcc.gnu.org

[Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670

2010-01-31 Thread janus at gcc dot gnu dot org
--- Comment #22 from janus at gcc dot gnu dot org 2010-01-31 22:01 --- Fixed with r156418. Thanks for the report! -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670

2010-01-30 Thread janus at gcc dot gnu dot org
--- Comment #19 from janus at gcc dot gnu dot org 2010-01-30 10:29 --- (In reply to comment #17) There is another problem left with the patch. I am not sure whether the code is legal, but it gives an ICE for me: implicit none type t integer :: X = -999.0 ! Real

<    1   2   3   4   5   6   7   8   9   10   >