[Bug fortran/29315] error passing an array derived from type element

2006-11-30 Thread chaoyingfu at gcc dot gnu dot org


--- Comment #9 from chaoyingfu at gcc dot gnu dot org  2006-12-01 01:03 
---
Subject: Bug 29315

Author: chaoyingfu
Date: Fri Dec  1 01:01:21 2006
New Revision: 119392

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=119392
Log:
Merged revisions 118654-118785 via svnmerge from 
svn+ssh://[EMAIL PROTECTED]/svn/gcc/trunk


  r118654 | jakub | 2006-11-10 07:50:39 -0800 (Fri, 10 Nov 2006) | 3 lines

* config/locale/gnu/c_locale.cc (__convert_to_v): Prefer
strtold_l over __strtold_l if available.

  r118659 | pault | 2006-11-10 09:21:57 -0800 (Fri, 10 Nov 2006) | 12 lines

  2006-11-10 Paul Thomas [EMAIL PROTECTED]

PR fortran/29315
* trans-expr.c (is_aliased_array): Treat correctly the case where the
component is itself and array or array reference.


  2006-11-10 Paul Thomas [EMAIL PROTECTED]

PR fortran/29315
* gfortran.dg/aliasing_dummy_4.f90: New test.

  r118661 | burnus | 2006-11-10 10:15:39 -0800 (Fri, 10 Nov 2006) | 6 lines

  2006-11-10  Tobias Burnus  [EMAIL PROTECTED]

 PR fortran/29454
 * resolve.c (gfc_resolve_blocks): Fix error message.

  r118662 | fche | 2006-11-10 10:42:28 -0800 (Fri, 10 Nov 2006) | 14 lines

  2006-11-10  Frank Ch. Eigler  [EMAIL PROTECTED]

PR libmudflap/28578
* mf-hooks1.c (__mf_0fn_malloc): Make the bootstrap buffers
static but not function scope static.
(free): Skip deallocation attempts for objects placed into
bootstrap buffers.
* testsuite/libmudflap.cth/pass59-frag.c: New test.


  Mlibmudflap/mf-hooks1.c
  Mlibmudflap/ChangeLog
  Alibmudflap/testsuite/libmudflap.cth/pass59-frag.c

  r118664 | pault | 2006-11-10 13:06:42 -0800 (Fri, 10 Nov 2006) | 16 lines

  2006-11-10 Paul Thomas [EMAIL PROTECTED]

 PR fortran/29758
 * check.c (gfc_check_reshape): Check that there are enough
 elements in the source array as to be able to fill an array
 defined by shape, when pad is absent.


  2006-11-10 Paul Thomas [EMAIL PROTECTED]

 PR fortran/29758
 * gfortran.dg/reshape_source_size_1.f90: New test.

  r118665 | hubicka | 2006-11-10 13:42:04 -0800 (Fri, 10 Nov 2006) | 9 lines

* cse.c (cse_process_notes): Copy the propagated value.
* local-alloc.c (update_equiv_regs): Copy the memory RTX to be used
in REG_EQUIV notes.
* gcse.c (try_replace_reg): Copy the replacement.
* i386.c (emit_i387_cw_initialization): Copy stored_mode
(assign_386_stack_local): Always return copied memory expression
* function.c (instantiate_virtual_regs_in_insn): Copy the operand
duplicates.

  r118668 | brooks | 2006-11-10 14:34:26 -0800 (Fri, 10 Nov 2006) | 9 lines

  * lang.opt (-fmodule-private): Remove option.
  * gfortran.h (gfc_option_t): Remove module_access_private flag.
  * options.c (gfc_init_options): Remove initialization for it.
  (gfc_process_option): Remove handling for -fmodule-private.
  * module.c (gfc_check_access): Add comments, remove check for
  gfc_option.flag_module_access_private.

  (Also fixed tab-damage in preceeding changelog entry.)

  r118670 | brooks | 2006-11-10 15:43:05 -0800 (Fri, 10 Nov 2006) | 3 lines

  Corrected gfc_process_option to gfc_handle_option in my last
  ChangeLog entry.

  r118676 | gccadmin | 2006-11-10 16:17:31 -0800 (Fri, 10 Nov 2006) | 1 line

  Daily bump.

  r118678 | sayle | 2006-11-10 17:47:18 -0800 (Fri, 10 Nov 2006) | 7 lines


* tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable)
when attempting to build INTEGER_CSTs of non-integral types.
* expmed.c (make_tree): Use the correct type, i.e. the inner
type, when constructing the individual elements of a CONST_VECTOR.

  r118682 | ghazi | 2006-11-10 20:01:42 -0800 (Fri, 10 Nov 2006) | 6 lines

* fold-const.c (negate_mathfn_p): Add BUILT_IN_ERF.

  testsuite:
* gcc.dg/torture/builtin-symmetric-1.c: New test.

  r118683 | ghazi | 2006-11-10 20:05:14 -0800 (Fri, 10 Nov 2006) | 8 lines

* builtins.c (fold_builtin_cos): Use fold_strip_sign_ops().
(fold_builtin_hypot): Likewise.
* fold-const.c (fold_strip_sign_ops): Handle odd builtins.

  testsuite:
* gcc.dg/builtins-20.c: Add more cases for stripping sign ops.

  r118684 | bergner | 2006-11-10 20:20:37 -0800 (Fri, 10 Nov 2006) | 3 lines

* rtl.h (MEM_COPY_ATTRIBUTES): Copy MEM_POINTER.

  r118685 | sayle | 2006-11-10 21:00:10 -0800 (Fri, 10 Nov 2006) | 5 lines


* fold-const.c (operand_equal_p) INTEGER_CST, REAL_CST, VECTOR_CST:
Don't check for TREE_CONSTANT_OVERFLOW when comparing constants.

  r118686 | jiez | 2006-11-10 23:48:33 -0800 (Fri, 10 Nov 2006) | 3 lines

* config/bfin/bfin.h (FUNCTION_PROFILER): Don't use LABELNO.
(NO_PROFILE_COUNTERS): Define as 1.

  

[Bug fortran/29315] error passing an array derived from type element

2006-11-11 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2006-11-12 07:40 ---
Subject: Bug 29315

Author: pault
Date: Sun Nov 12 07:40:26 2006
New Revision: 118719

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=118719
Log:
2006-11-12 Paul Thomas [EMAIL PROTECTED]

PR fortran/29699
* trans-array.c (structure_alloc_comps): Detect pointers to
arrays and use indirect reference to declaration.
* resolve.c (resolve_fl_variable): Tidy up condition.
(resolve_symbol): The same and only add initialization code if
the symbol is referenced.
* trans-decl.c (gfc_trans_deferred_vars): Call gfc_trans_
deferred_array before gfc_trans_auto_array_allocation.

PR fortran/21730
* symbol.c (check_done): Remove.
(gfc_add_attribute): Remove reference to check_done and remove
the argument attr_intent.
(gfc_add_allocatable, gfc_add_dimension, gfc_add_external,
gfc_add_intrinsic, gfc_add_optional, gfc_add_pointer,
gfc_add_cray_pointer, gfc_add_cray_pointee, gfc_add_result,
gfc_add_target, gfc_add_in_common, gfc_add_elemental,
gfc_add_pure, gfc_add_recursive, gfc_add_procedure,
gfc_add_type): Remove references to check_done.
* decl.c (attr_decl1): Eliminate third argument in call to
gfc_add_attribute.
* gfortran.h : Change prototype for gfc_add_attribute.

PR fortran/29431
* trans-array.c(get_array_ctor_strlen): If we fall through to
default, use a constant character length if it is available.

PR fortran/29758
* check.c (gfc_check_reshape): Check that there are enough
elements in the source array as to be able to fill an array
defined by shape, when pad is absent.

PR fortran/29315
* trans-expr.c (is_aliased_array): Treat correctly the case where the
component is itself and array or array reference.


2006-11-12 Paul Thomas [EMAIL PROTECTED]

PR fortran/29699
* gfortran.dg/alloc_comp_auto_array_1.f90: New test.

PR fortran/21730
* gfortran.dg/change_symbol_attributes_1.f90: New test.

PR fortran/29431
* gfortran.dg/array_constructor_13.f90: New test.

PR fortran/29758
* gfortran.dg/reshape_source_size_1.f90: New test.

PR fortran/29315
* gfortran.dg/aliasing_dummy_4.f90: New test.

Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/aliasing_dummy_4.f90
   
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/array_constructor_13.f90
   
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/change_symbol_attributes_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/reshape_source_size_1.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/check.c
branches/gcc-4_2-branch/gcc/fortran/decl.c
branches/gcc-4_2-branch/gcc/fortran/gfortran.h
branches/gcc-4_2-branch/gcc/fortran/resolve.c
branches/gcc-4_2-branch/gcc/fortran/symbol.c
branches/gcc-4_2-branch/gcc/fortran/trans-array.c
branches/gcc-4_2-branch/gcc/fortran/trans-decl.c
branches/gcc-4_2-branch/gcc/fortran/trans-expr.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/29315] error passing an array derived from type element

2006-11-11 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2006-11-12 07:44 ---
Fixed on trunk and 4.2. 4.1 will follow next weekend.

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=29315



[Bug fortran/29315] error passing an array derived from type element

2006-11-10 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2006-11-10 17:22 ---
Subject: Bug 29315

Author: pault
Date: Fri Nov 10 17:21:57 2006
New Revision: 118659

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=118659
Log:
2006-11-10 Paul Thomas [EMAIL PROTECTED]

PR fortran/29315
* trans-expr.c (is_aliased_array): Treat correctly the case where the
component is itself and array or array reference.


2006-11-10 Paul Thomas [EMAIL PROTECTED]

PR fortran/29315
* gfortran.dg/aliasing_dummy_4.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/aliasing_dummy_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/29315] error passing an array derived from type element

2006-11-09 Thread patchapp at dberlin dot org


--- Comment #5 from patchapp at dberlin dot org  2006-11-09 22:40 ---
Subject: Bug number PR29315

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-11/msg00582.html


-- 


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



[Bug fortran/29315] error passing an array derived from type element

2006-10-27 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2006-10-27 14:37 ---
I am sorry but I realised on looking at this again that the stride has nothing
to do with this one - the patch below regtests but has not been checked for
correct-in-all-cases logic.  Since the original was incorrect, give me a couple
more days to get home and give this some clear thought... or what goes for
clear thought.

Paul


Index: gcc/fortran/trans-expr.c
===
*** gcc/fortran/trans-expr.c(revision 117860)
--- gcc/fortran/trans-expr.c(working copy)
*** is_aliased_array (gfc_expr * e)
*** 1840,1846 
if (ref-type == REF_ARRAY)
seen_array = true;

!   if (ref-next == NULL
 ref-type != REF_ARRAY)
return seen_array;
  }
--- 1845,1851 
if (ref-type == REF_ARRAY)
seen_array = true;

!   if (seen_array
 ref-type != REF_ARRAY)
return seen_array;
  }


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-10-02 03:07:51 |2006-10-27 14:37:47
   date||


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



[Bug fortran/29315] error passing an array derived from type element

2006-10-02 Thread paul dot richard dot thomas at cea dot fr


--- Comment #3 from paul dot richard dot thomas at cea dot fr  2006-10-02 
08:09 ---
(In reply to comment #2)
 Confirmed, we don't set the stride correctly as far as I can tell.

This comes about because of the admitted kludge in the mechanism for passing
components of derived type arrays. At line 1588 in trans-exp.c, you will find
the comment:

/* Returns a reference to a temporary array into which a component of
   an actual argument derived type array is copied and then returned
   after the function call.
   TODO Get rid of this kludge, when array descriptors are capable of
   handling aliased arrays.  */

Maybe the time has come for byte size strides, although it will be a horrific
job to implement.

Paul


-- 


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



[Bug fortran/29315] error passing an array derived from type element

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


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-10-02 02:53 ---
I know I have seen a bug like this before.


-- 


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



[Bug fortran/29315] error passing an array derived from type element

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


--- Comment #2 from pinskia at gcc dot gnu dot org  2006-10-02 03:07 ---
Confirmed, we don't set the stride correctly as far as I can tell.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-10-02 03:07:51
   date||


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