Thomas Koenig [Sun, 9 Jan 2011 15:37:47 +0000 (15:37 +0000)]
re PR fortran/38536 (ICE with C_LOC in resolve.c due to not properly going through expr->ref)
2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/38536
* resolve.c (is_scalar_expr_ptr): For a substring reference,
use gfc_dep_compare_expr to compare start and end expession.
Add FIXME for using gfc_deb_compare_expr elsewhere.
2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/38536
* gfortran.dg/iso_c_binding_c_loc_char_1.f03: New test.
Ralf Wildenhues [Sun, 9 Jan 2011 07:18:42 +0000 (07:18 +0000)]
doc: cpp manual nits
gcc/:
* doc/cpp.texi (C++ Named Operators): Fix markup for header
file name.
* doc/cppinternals.texi (Top): Wrap node in @ifnottex to avoid
two extra empty pages in PDF output.
Nicola Pero [Sat, 8 Jan 2011 19:44:30 +0000 (19:44 +0000)]
In gcc/: 2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47078
* c-parser.c (c_parser_objc_type_name): If the type is unknown,
for error recovery purposes behave as if it was not specified so
that the default type is usd.
In gcc/testsuite/:
2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/cp/:
2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47078
* parser.c (cp_parser_objc_typename): If the type is unknown, for
error recovery purposes behave as if it was not specified so that
the default type is used.
Paul Thomas [Sat, 8 Jan 2011 19:17:03 +0000 (19:17 +0000)]
re PR fortran/46896 (Wrong code with transpose(a) passed to subroutine)
2011-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/46896
* trans-expr.c (gfc_conv_procedure_call): With a non-copying
procedure argument (eg TRANSPOSE) use a temporary if there is
any chance of aliasing due to host or use association.
(arrayfunc_assign_needs_temporary): Correct logic for function
results and do not use a temporary for implicitly PURE
variables. Use a temporary for Cray pointees.
* symbol.c (gfc_add_save): Explicit SAVE not compatible with
implicit pureness of containing procedure.
* decl.c (match_old_style_init, gfc_match_data): Where decl
would fail in PURE procedure, set implicit_pure to zero.
* gfortran.h : Add implicit_pure to structure symbol_attr and
add prototype for function gfc_implicit_pure.
* expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
Where decl would fail in PURE procedure, reset implicit_pure.
* io.c (match_vtag, gfc_match_open, gfc_match_close,
gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
* match.c (gfc_match_critical, gfc_match_stopcode,
sync_statement, gfc_match_allocate, gfc_match_deallocate): The
same.
* parse.c (decode_omp_directive): The same.
(parse_contained): If not PURE, set implicit pure attribute.
* resolve.c (resolve_formal_arglist, resolve_structure_cons,
resolve_function, resolve_ordinary_assign) : The same.
(gfc_implicit_pure): New function.
* module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
to ab_attribute enum and use it in this function.
2011-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/46896
* gfortran.dg/transpose_optimization_2.f90 : New test.
Thomas Koenig [Sat, 8 Jan 2011 09:38:13 +0000 (09:38 +0000)]
re PR fortran/45777 (Alias analysis broken for arrays where LHS or RHS is a component ref)
2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45777
* symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
make static and move in front of its only caller, to ...
* trans-array.c (symbols_could_alias): ... here.
Pass information about pointer and target status as
arguments. Allocatable arrays don't alias anything
unless they have the POINTER attribute.
(gfc_could_be_alias): Keep track of pointer and target
status when following references. Also check if typespecs
of components match those of other components or symbols.
2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45777
* gfortran.dg/dependency_39.f90: New test.
Jan Hubicka [Sat, 8 Jan 2011 01:37:00 +0000 (02:37 +0100)]
Makefile.in: Regenerate.
* Makefile.in: Regenerate.
* Makefile.def (gcc host module) and soft dependency on lto-plugin
and configure dependency on lto-plugin configure.
(lto-plugin module): Remove dependency on GCC; add dependency on
liniberty.
* doc/invoke.texi: (-flto, -fuse-linker-plugin): Update defaults
and no longer claim that gold is required for linker plugin.
* configure: Regenerate.
* gcc.c (PLUGIN_COND): New macro.
(LINK_COMMAND_SPEC): Use it.
(main): Default to plugin enabled with HAVE_LTO_PLUGIN is set.
* config.in (HAVE_LTO_PLUGIN): New.
* configure.ac (--with-lto-plugin): New parameter; autodetect
HAVE_LTO_PLUGIN.
Jan Hubicka [Fri, 7 Jan 2011 22:52:54 +0000 (23:52 +0100)]
re PR tree-optimization/46367 (ICE during cgraph edge cloning)
PR tree-optimization/46367
* g++.dg/torture/pr46367.C: New file.
* ipa-inline.c (cgraph_clone_inlined_nodes): Use original function only
when we can update original.
(cgraph_mark_inline_edge): Sanity check.
* ipa-prop.c (ipa_make_edge_direct_to_target): Sanity check.
Tobias Burnus [Fri, 7 Jan 2011 16:19:29 +0000 (17:19 +0100)]
re PR fortran/41580 ([OOP] SAME_TYPE_AS and EXTENDS_TYPE_OF - add compile-time simplifcation)
2011-01-07 Tobias Burnus <burnus@net-b.de>
PR fortran/41580
* class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
* intrinsic.c (add_functions): Use simplify functions for
EXTENDS_TYPE_OF and SAME_TYPE_AS.
* intrinsic.h (gfc_simplify_extends_type_of,
gfc_simplify_same_type_as): New prototypes.
* simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
gfc_simplify_same_type_as): New functions.
Iain Sandoe [Fri, 7 Jan 2011 13:52:29 +0000 (13:52 +0000)]
provide pubnames when there are multiple code sections
* dwarf2out.c (gen_subprogram_die): Add pubnames with code ranges for
DWARF >= 3. Add pubnames for the primary section and a reduced DIE for
the secondary code fragment when outputting for DWARF == 2.
Janus Weil [Fri, 7 Jan 2011 12:08:21 +0000 (13:08 +0100)]
re PR fortran/47189 ([OOP] calling STORAGE_SIZE on a NULL-initialized class pointer)
2011-01-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/47189
PR fortran/47194
* gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
* class.c (gfc_class_null_initializer): Initialize _vptr to declared
type.
* expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
* resolve.c (resolve_deallocate_expr): _data component will be added
at translation stage.
* symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
* trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
Daniel Franke [Thu, 6 Jan 2011 21:42:53 +0000 (16:42 -0500)]
re PR fortran/47195 (New Fortran test failures)
2011-01-06 Daniel Franke <franke.daniel@gmail.com>
PR fortran/47195
* gfortran.dg/interface_33.f90: Fixed dg-error declarations.
* gfortran.dg/defined_operators_1.f90: Split the subroutine
from the interface of functions to not hide the errors that
shall be tested.
Rainer Orth [Thu, 6 Jan 2011 19:00:10 +0000 (19:00 +0000)]
re PR target/38118 (gcc emits non-TLS data as TLS on Solaris 11/SPARC)
PR target/38118
* config/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Also switch to .bss
if coming from .tdata.
* config/i386/sol2-10.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise.
Jan Hubicka [Thu, 6 Jan 2011 18:50:20 +0000 (19:50 +0100)]
re PR lto/47188 (Undefined reference errors when combining IR and non-IR object files)
PR lto/47188
* collect2.c (main): Do not enable LTOmode when plugin is active.
* testsuite/gcc.dg/lto/pr47188_0.c: New testcase.
* testsuite/gcc.dg/lto/pr47188_1.c: New testcase.
Daniel Franke [Thu, 6 Jan 2011 16:08:24 +0000 (11:08 -0500)]
re PR fortran/33117 (Improve error message for generic interface with subroutines & functions)
gcc/fortran/:
2011-01-06 Daniel Franke <franke.daniel@gmail.com>
PR fortran/33117
PR fortran/46478
* parse.c (parse_interface): Remove check for procedure types.
* interface.c (check_interface0): Verify that procedures are
either all SUBROUTINEs or all FUNCTIONs.
gcc/testsuite/:
2011-01-06 Daniel Franke <franke.daniel@gmail.com>
PR fortran/33117
PR fortran/46478
* gfortran.dg/interface_33.f90: New test.
Jakub Jelinek [Thu, 6 Jan 2011 10:37:02 +0000 (11:37 +0100)]
re PR c/47150 (ICE in gimplify_expr at gimplify.c)
PR c/47150
* c-convert.c (convert): When converting a complex expression
other than COMPLEX_EXPR to a different complex type, ensure
c_save_expr is called instead of save_expr, unless in_late_binary_op.
* c-typeck.c (convert_for_assignment): Set in_late_binary_op also
when converting COMPLEX_TYPE.
Ira Rosen [Thu, 6 Jan 2011 07:34:24 +0000 (07:34 +0000)]
re PR tree-optimization/47139 (ice in process_use, at tree-vect-stmts.c:290)
PR tree-optimization/47139
* tree-vect-loop.c (vect_is_simple_reduction_1): Check that
only the last reduction value is used outside the loop. Update
documentation.
Martin Jambor [Wed, 5 Jan 2011 14:55:27 +0000 (15:55 +0100)]
re PR lto/47162 (LTO is broken)
Fix PR lto/47162.
2011-01-05 Martin Jambor <mjambor@suse.cz>
PR lto/47162
* lto-cgraph.c (output_cgraph_opt_summary_p): Also check for thunk
deltas on streamed outgoing edges.
(output_node_opt_summary): Output info for outgoing edges only when
the node is in new parameter set.
(output_cgraph_opt_summary): New parameter set, passed to the two
aforementioned functions. Update its forward declaration and its
callee too.
Eric Botcazou [Wed, 5 Jan 2011 11:23:40 +0000 (11:23 +0000)]
re PR tree-optimization/47005 (ACATS c62002a is miscompiled at -O2)
PR tree-optimization/47005
* tree-sra.c (struct access): Add 'non_addressable' bit.
(create_access): Set it for a DECL_NONADDRESSABLE_P field.
(decide_one_param_reduction): Return 0 if the parameter is passed by
reference and one of the accesses in the group is non_addressable.