[Bug fortran/26586] g77 -pedantic wrongly rejecting statement function

2006-03-06 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-03-06 22:56 ---
Fixed in 4.0.0 with the gfortran rewrite.  3.4.6 is about to be released and
there is almost no way to get a non regression fixed.

So closing as fixed for 4.0.0.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
   Keywords||rejects-valid
  Known to fail||2.95.3 3.2.3 3.3.2 3.3.3
   ||3.4.0 3.0.4
 Resolution||FIXED
   Target Milestone|--- |4.0.0


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



[Bug fortran/26107] ICE after error message on invalid code

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2006-03-06 22:56 ---
Subject: Bug 26107

Author: pault
Date: Mon Mar  6 22:56:39 2006
New Revision: 111793

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111793
Log:
2006-03-06  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

PR fortran/19546
* trans-expr.c (gfc_conv_variable): Detect reference to parent result,
store current_function_decl, replace with parent, whilst calls are
made to gfc_get_fake_result_decl, and restore afterwards. Signal this
to gfc_get_fake_result_decl with a new argument, parent_flag.
* trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
is set to zero.
* trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
* trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
add decl to parent function. Replace refs to current_fake_result_decl
with refs to this_result_decl.
(gfc_generate_function_code): Null parent_fake_result_decl before the
translation of code for contained procedures. Set parent_flag to zero
in call to gfc_get_fake_result_decl.
* trans-intrinsic.c (gfc_conv_intrinsic_len): The same.

2006-03-06  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* pure_dummy_length_1.f90: New test.

PR fortran/19546
* gfortran.dg/parent_result_ref_1.f90: New test.
* gfortran.dg/parent_result_ref_2.f90: New test.
* gfortran.dg/parent_result_ref_3.f90: New test.
* gfortran.dg/parent_result_ref_4.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_1.f90
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_2.f90
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_3.f90   (with props)
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_4.f90
trunk/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/fortran/trans-openmp.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/gfortran.dg/parent_result_ref_3.f90
('svn:executable' added)


-- 


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



[Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2006-03-06 22:56 ---
Subject: Bug 19546

Author: pault
Date: Mon Mar  6 22:56:39 2006
New Revision: 111793

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111793
Log:
2006-03-06  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

PR fortran/19546
* trans-expr.c (gfc_conv_variable): Detect reference to parent result,
store current_function_decl, replace with parent, whilst calls are
made to gfc_get_fake_result_decl, and restore afterwards. Signal this
to gfc_get_fake_result_decl with a new argument, parent_flag.
* trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
is set to zero.
* trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
* trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
add decl to parent function. Replace refs to current_fake_result_decl
with refs to this_result_decl.
(gfc_generate_function_code): Null parent_fake_result_decl before the
translation of code for contained procedures. Set parent_flag to zero
in call to gfc_get_fake_result_decl.
* trans-intrinsic.c (gfc_conv_intrinsic_len): The same.

2006-03-06  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* pure_dummy_length_1.f90: New test.

PR fortran/19546
* gfortran.dg/parent_result_ref_1.f90: New test.
* gfortran.dg/parent_result_ref_2.f90: New test.
* gfortran.dg/parent_result_ref_3.f90: New test.
* gfortran.dg/parent_result_ref_4.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_1.f90
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_2.f90
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_3.f90   (with props)
trunk/gcc/testsuite/gfortran.dg/parent_result_ref_4.f90
trunk/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/fortran/trans-openmp.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/gfortran.dg/parent_result_ref_3.f90
('svn:executable' added)


-- 


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



[Bug fortran/26107] ICE after error message on invalid code

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2006-03-06 23:03 ---
Fixed on mainline and will be fixed tomorrow on 4.1.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2006-03-06 23:21 ---
This will only be fixed on 4.2.  The 4.1 and 4.2 trees have diverged so much in
gfc_get_fake_result_decl that it will be a lot of work to bring it up to the
point where it will take the patch for this PR.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/26041] [4.1]: FORTRAN compiler won't compile the valid code

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #10 from pault at gcc dot gnu dot org  2006-03-06 23:25 ---
HJ

Will you port this to 4.1 or should it be closed? My preference would be the
former

Paul


-- 


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



[Bug fortran/24519] gfortran slow because of incomplete dependency checking

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 24519

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/25395] equivalence to common block array broken

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 25395

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/26393] ICE with function returning variable lenght array

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 26393

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/26107] ICE after error message on invalid code

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 26107

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/24557] ICE: PRINTing function result of size depending on assumed length CHARACTER dummy

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 24557

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/20938] Dependency checking fails for equivalences

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 20938

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/25089] Contained function and namelist names clash.

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #3 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 25089

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/25054] nonconstant bounds array cannot appear in a namelist

2006-03-06 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2006-03-07 00:06 ---
Subject: Bug 25054

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=111796
Log:
2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* iresolve.c (gfc_resolve_dot_product):  Remove any difference in
treatment of logical types.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

PR fortran/26393
* trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
must be referenced to include unreferenced symbols in an interface
body. 

PR fortran/20938
* trans-array.c (gfc_conv_resolve_dependencies): Add call to
gfc_are_equivalenced_arrays.
* symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
functions. (gfc_free_namespace): Call them.
* trans-common.c (copy_equiv_list_to_ns): New function.
(add_equivalences): Call it.
* gfortran.h: Add equiv_lists to gfc_namespace and define
gfc_equiv_list and gfc_equiv_info.
* dependency.c (gfc_are_equivalenced_arrays): New function.
(gfc_check_dependency): Call it.
* dependency.h: Prototype for gfc_are_equivalenced_arrays.

PR fortran/24519
* dependency.c (gfc_is_same_range): Correct typo.
(gfc_check_section_vs_section): Call gfc_is_same_range.

PR fortran/25395
* trans-common.c (add_equivalences): Add a new flag that is set when
an equivalence is seen that prevents more from being reset until the
start of a new traversal of the list, thus ensuring completion of
all the equivalences.

PR fortran/25054
* resolve.c (is_non_constant_shape_array): New function.
(resolve_fl_variable): Remove code for the new function and call it.
(resolve_fl_namelist): New function.  Add test for namelist array
with non-constant shape, using is_non_constant_shape_array.
(resolve_symbol): Remove code for resolve_fl_namelist and call it.

PR fortran/25089
* match.c (match_namelist): Increment the refs field of an accepted
namelist object symbol.
* resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
with contained or module procedures.

PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.

2006-03-07  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26107
* resolve.c (resolve_function): Add name after test for pureness.

* gfortran.dg/logical_dot_product.f90: New test. 

PR fortran/26393
* gfortran.dg/used_interface_ref.f90: New test.

PR fortran/20938
* gfortran.dg/dependency_2.f90: New test.
* gfortran.fortran-torture/execute/where17.f90: New test.
* gfortran.fortran-torture/execute/where18.f90: New test.
* gfortran.fortran-torture/execute/where19.f90: New test.
* gfortran.fortran-torture/execute/where20.f90: New test.

PR fortran/24519
* gfortran.dg/dependency_3.f90: New test.
* gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
XFAILs.

PR fortran/25395
* gfortran.dg/equiv_6.f90: New test.

PR fortran/25054
* gfortran.dg/namelist_5.f90: New test.

PR fortran/25089
* gfortran.dg/namelist_4.f90: New test.

PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
branches/gcc-4_1-branch/MAINTAINERS
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/dependency.c

[Bug fortran/26554] [gfortran] incorrect behaviour when reading a logical variable from a string

2006-03-06 Thread jvdelisle at gcc dot gnu dot org


--- Comment #12 from jvdelisle at gcc dot gnu dot org  2006-03-07 01:07 
---
In the interim, use the iostat= and test for the error you are looking for.  I
am still digging around on this one to make sure I am not in a standard
compliance conflict if I implement this feature.


-- 


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



[Bug rtl-optimization/26587] New: strict aliasing incorrectly pre-loads an array element

2006-03-06 Thread solar at openwall dot com
I _think_ I understand C strict aliasing - it's based on the type of
expressions.  In the testcase below, the type of expressions is the same, which
is why I think it's a compiler bug.

The bug is reproducible with gcc 4.1.0 on multiple platforms.  I've tried i386
(i686) and alpha myself and am able to reproduce the problem on both.  The
original reporter of the problem with my program (the real one, not the
testcase) was able to reproduce the problem on other architectures.

The problem does not occur with gcc 2.95.3 and 3.4.5.

Basically, in the program below, gcc 4.1.0 would pre-load BF_current.P[0] and
BF_current.P[17] into registers or stack locations - however the loop modifies
P[0] via ptr.

#include stdio.h
#include string.h

#define BF_N 16

typedef unsigned int BF_word;
typedef BF_word BF_key[BF_N + 2];

static struct {
BF_word S[4][0x100];
BF_key P;
} BF_current;

#define BF_ROUND(L, R, N) \
tmp1 = L  0xFF; \
tmp2 = L  8; \
tmp2 = 0xFF; \
tmp3 = L  16; \
tmp3 = 0xFF; \
tmp4 = L  24; \
tmp1 = BF_current.S[3][tmp1]; \
tmp2 = BF_current.S[2][tmp2]; \
tmp3 = BF_current.S[1][tmp3]; \
tmp3 += BF_current.S[0][tmp4]; \
tmp3 ^= tmp2; \
R ^= BF_current.P[N + 1]; \
tmp3 += tmp1; \
R ^= tmp3;

#define BF_ENCRYPT \
L ^= BF_current.P[0]; \
{ \
int i; \
for (i = 0; i  BF_N; i += 2) { \
BF_ROUND(L, R, i); \
BF_ROUND(R, L, i+1); \
} \
} \
tmp4 = R; \
R = L; \
L = tmp4 ^ BF_current.P[BF_N + 1];

int main(void)
{
BF_word L, R;
BF_word tmp1, tmp2, tmp3, tmp4, *ptr;
BF_word i, j;

for (i = 0; i  4; i++)
for (j = 0; j  0x100; j++)
BF_current.S[i][j] = (i + 0x12345678) * j;
for (i = 0; i  BF_N + 2; i++)
BF_current.P[i] = i * 0x98765432;

L = R = 0;
ptr = BF_current.P;
do {
#ifndef WORKAROUND
ptr += 2;
BF_ENCRYPT;
*(ptr - 2) = L;
*(ptr - 1) = R;
#else
BF_ENCRYPT;
*ptr = L;
*(ptr + 1) = R;
ptr += 2;
#endif
} while (ptr  BF_current.P[BF_N + 2]);

printf(%08x %08x\n, L, R);

return 0;
}

host!user:~$ gcc gcc-4.1.0-aliasing-bug.c -o gcc-4.1.0-aliasing-bug -Wall -O2
-fno-strict-aliasing
host!user:~$ ./gcc-4.1.0-aliasing-bug 
8261e2e6 f1f1bc33
host!user:~$ gcc gcc-4.1.0-aliasing-bug.c -o gcc-4.1.0-aliasing-bug -Wall -O2 
host!user:~$ ./gcc-4.1.0-aliasing-bug 
46be060b df072f90
host!user:~$ gcc gcc-4.1.0-aliasing-bug.c -o gcc-4.1.0-aliasing-bug -Wall -O2
-DWORKAROUND
host!user:~$ ./gcc-4.1.0-aliasing-bug 
8261e2e6 f1f1bc33
host!user:~$ uname -mrs
Linux 2.4.32-ow1 alpha
host!user:~$ gcc -v
Using built-in specs.
Target: alphaev56-unknown-linux-gnu
Configured with: ./configure --prefix=/home/user/gcc-4.1.0
Thread model: posix
gcc version 4.1.0

(i386 gives the same results)


-- 
   Summary: strict aliasing incorrectly pre-loads an array element
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: solar at openwall dot com
 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=26587



[Bug rtl-optimization/26587] strict aliasing incorrectly pre-loads an array element

2006-03-06 Thread solar at openwall dot com


--- Comment #1 from solar at openwall dot com  2006-03-07 01:50 ---
Created an attachment (id=10979)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10979action=view)
testcase


-- 


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



[Bug rtl-optimization/26587] strict aliasing incorrectly pre-loads an array element

2006-03-06 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2006-03-07 02:03 ---
Hmm -O2 -fno-ivopts allows for it to work.


-- 


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



[Bug fortran/26588] New: gfortran -fopenmp passes unrecognised -pthread

2006-03-06 Thread billingd at gcc dot gnu dot org
On cygwin, gfortran -fopenmp gives the warning
  gfortran: unrecognized option '-pthread'
which gives a heap of failures in the testsuite.

This is set in gcc.c:
/* Adding -fopenmp should imply pthreads.  This is particularly important
   for targets that use different start files and suchlike.  */
#ifndef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS %{fopenmp: -pthread}
#endif


I think the fix is to override it, as is done in gcc/config/darwin.h

/* Every program on darwin links against libSystem which contains the pthread
   routines, so there's no need to explicitly call out when doing threaded
   work.  */
#undef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS 

I'll prepare a patch at some stage.


-- 
   Summary: gfortran -fopenmp passes unrecognised -pthread
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: billingd at gcc dot gnu dot org
ReportedBy: billingd at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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



[Bug fortran/26588] gfortran -fopenmp passes unrecognised -pthread

2006-03-06 Thread billingd at gcc dot gnu dot org


-- 

billingd at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-03-07 02:05:04
   date||


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



[Bug rtl-optimization/26587] [4.1 Regression] strict aliasing incorrectly pre-loads an array element with loops

2006-03-06 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2006-03-07 02:08 ---
This is interesting because the mainline works with or without
-fno-strict-aliasing.

Confirmed a regression, hopefully someone will reduce the testcase further.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|normal  |critical
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||wrong-code
  Known to fail||4.1.0
  Known to work||4.2.0 4.0.3
   Last reconfirmed|-00-00 00:00:00 |2006-03-07 02:08:20
   date||
Summary|strict aliasing incorrectly |[4.1 Regression] strict
   |pre-loads an array element  |aliasing incorrectly pre-
   ||loads an array element with
   ||loops
   Target Milestone|--- |4.1.1


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



[Bug target/26588] gfortran -fopenmp passes unrecognised -pthread

2006-03-06 Thread billingd at gcc dot gnu dot org


--- Comment #1 from billingd at gcc dot gnu dot org  2006-03-07 02:22 
---
I am testing this.

2006-03-07  David Billinghurst ([EMAIL PROTECTED])

PR target/26588
* config/i386/cygwin.h (GOMP_SELF_SPECS): Define.


--- cygwin.h~   2006-02-01 14:17:44.0 +1100
+++ cygwin.h2006-03-07 13:08:52.420324700 +1100
@@ -232,3 +232,10 @@
 /* Binutils does not handle weak symbols from dlls correctly.  For now,
do not use them unnecessarily in gthr-posix.h.  */
 #define GTHREAD_USE_WEAK 0
+
+/* Every program on cygwin links against cygwin.dll which contains 
+   the pthread routines.  There is no need to explicitly link them
+   and the -pthread flag is not recognised.  */
+#undef GOMP_SELF_SPECS
+#define GOMP_SELF_SPECS 


-- 


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



[Bug fortran/25054] nonconstant bounds array cannot appear in a namelist

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.1


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



[Bug fortran/25089] Contained function and namelist names clash.

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.1


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



[Bug fortran/20938] Dependency checking fails for equivalences

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.1


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



[Bug fortran/24557] ICE: PRINTing function result of size depending on assumed length CHARACTER dummy

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.1


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



[Bug fortran/26107] ICE after error message on invalid code

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.1


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



[Bug fortran/26393] ICE with function returning variable lenght array

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.1


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



[Bug fortran/25395] equivalence to common block array broken

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.2.0   |4.1.1


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



[Bug fortran/24519] gfortran slow because of incomplete dependency checking

2006-03-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.2.0   |4.1.1


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



[Bug libfortran/26564] ../.././libgfortran/mk-kinds-h.sh: Unknown type

2006-03-06 Thread diskman at kc dot rr dot com


--- Comment #12 from diskman at kc dot rr dot com  2006-03-07 04:12 ---
Did I scare everyone off? I have a feeling that the GCC-4.x Fortran code may
have never worked on the Alpha... I could be wrong...


-- 


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



[Bug libfortran/26564] ../.././libgfortran/mk-kinds-h.sh: Unknown type

2006-03-06 Thread sgk at troutmask dot apl dot washington dot edu


--- Comment #13 from sgk at troutmask dot apl dot washington dot edu  
2006-03-07 04:17 ---
Subject: Re:  ../.././libgfortran/mk-kinds-h.sh: Unknown type

On Tue, Mar 07, 2006 at 04:12:10AM -, diskman at kc dot rr dot com wrote:
 
 Did I scare everyone off? I have a feeling that the GCC-4.x Fortran code may
 have never worked on the Alpha... I could be wrong...
 

The fortran code works just fine.  It's gmp that is fubar.
Also, note FX has told you that he build gfortran on alpha
for some version of linux.


-- 


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



[Bug c/26589] New: Optimizer hangs on conditional expression

2006-03-06 Thread pmcilroy at gmail dot com
I compiled this trivial function on the OS X 10.3.9 g++ compiler, which is
still only version 3.3.  With the optimizer enabled -O2, the compiler hangs. 
Without optimization, the compile succeeds.

Code:


int f(int x) {
 return 1 / (x ? 1 : 0) ;
}

GCC VERSION:
gcc version 3.3 20030304 (Apple Computer, Inc. build 1666)


-- 
   Summary: Optimizer hangs on conditional expression
   Product: gcc
   Version: 3.3.6
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pmcilroy at gmail dot com


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



[Bug c/26589] Optimizer hangs on conditional expression

2006-03-06 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-03-07 04:43 ---
This works in 3.3.2 with the FSF GCC.  Please report this bug to Apple first
since it is their modified version of gcc.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME


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



[Bug libfortran/26564] ../.././libgfortran/mk-kinds-h.sh: Unknown type

2006-03-06 Thread fxcoudert at gcc dot gnu dot org


--- Comment #14 from fxcoudert at gcc dot gnu dot org  2006-03-07 07:16 
---
(In reply to comment #12)
 Did I scare everyone off?

 I have a feeling that the GCC-4.x Fortran code may
 have never worked on the Alpha... I could be wrong...

We have had reports of successful building on alphaev67-unknown-linux-gnu,
alphaev6-unknown-linux-gnu, alpha-dec-osf4.0f.

As I do personnaly have access to:

HP Tru64 UNIX 5.1B  AlphaServer DS152 EV68, 1.0GHz
HP Tru64 UNIX 5.1B  AlphaServer ES454 EV68, 1 GHz
HP Tru64 UNIX 5.1B  AlphaServer ES472 EV7, 1.0 GHz
Debian GNU/Linux 3.1r0  AlphaServer DS202 EV6, 500 MHz
FreeBSD 6.0 AlphaStation XP1000 1 EV67, 667 MHz

Is any of those close enough of your own machine (I don't know alphas very
well) so that I could probably reproduce your bug? Or could I build a working
GMP/MPFR on any of those and send it to you for testing?

Also, you did not say how you compiled your gmp without optimization. Did you
try the --target=none --host=none --build=none trick?


-- 


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



[Bug fortran/24406] EQUIVALENCE broken in 32-bit code with optimization -O2

2006-03-06 Thread paul dot richard dot thomas at cea dot fr


--- Comment #13 from paul dot richard dot thomas at cea dot fr  2006-03-07 
07:28 ---
Subject: RE:  EQUIVALENCE broken in 32-bit code with optimization -O2

Andrew,

Oh, I did miss something, then!

 The symptom of this testcase passing might work but the bug 
 is still there and
 most likely cannot expose it at the tree level and it is semi 
 hard to expose it
 even on the RTL level.

If it is hard to expose, do we care about it?  Is it certain systems that are
sensistive to it or?

 Comment #5 shows what needs to be added to the Fortran 
 front-end which I will
 do sometime this week when I get some time (but note I have 
 two papers to write
 which is what is right now taking up my time).

Me too. *sigh*

All the best

Paul


-- 


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



<    1   2