PR tree-optimization/35899
* tree-inline.c (expand_call_inline): Use GIMPLE_STMT_OPERAND
rather than TREE_OPERAND.
* gcc.dg/pr35899.c: New test.
From-SVN: r134350
gcc/ada/
PR ada/29015
* sem_ch12.adb (Instantiate_Type): Check whether the full view of
the type is known instead of the underlying type.
gcc/testsuite/
PR ada/29015
* gnat.dg/incomplete1.ads, gnat.dg/incomplete2.ads,
gnat.dg/incomplete2.adb: New.
From-SVN: r134345
2008-04-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35864
* expr.c (scalarize_intrinsic_call): Reorder identification of
array argument so that if one is not found a segfault does not
occur. Return FAILURE if all scalar arguments.
From-SVN: r134329
* gengtype.c (write_root): Param_is argument is OK.
* expr.c (expand_expr_real_1): Update call of get_exception_*.
* function.h: Include varray.h
(rtl_eh): New stucture based on except.c one.
(call_site_record): New forward declaration and vector type.
* calls.c (emit_call_1): Do not call
note_current_region_may_contain_throw.
* except.c (eh_status): Remove cur_region, try_region since they are
unused.
Move filter, exc_ptr, ttype_data, ehspec_data, action_record_data and
exception_handler_label_map, ehr_stackadj, ehr_handler, ehr_label,
sjlj_fc, sjlj_exit_after to rth_eh in function.h.
Remove call_site_data_used, call_site_data_size.
Turn call_site_record into vector in function.h.
(note_current_region_may_contain_throw): Remove.
(get_exception_pointer, get_exception_filter): Do not take struct
function argument; update.
(add_ehl_entry, find_exception_handler_labels, ehspec_filter_hash,
add_ttypes_entry, add_ehspec_entry, assign_filter_values,
build_post_landing_pads, dw2_build_landing_pads,
sjlj_assign_call_site_values, sjlj_mark_call_sites,
sjlj_emit_function_enter, sjlj_emit_function_enter,
sjlj_emit_function_exit, sjlj_emit_dispatch_table,
sjlj_build_landing_pads, finish_eh_generation,
remove_exception_handler_label, remove_eh_handler,
maybe_remove_eh_handler, add_reachable_handler,
reachable_handlers, expand_builtin_eh_return,
expand_eh_return, add_action_record, collect_one_action_chain,
add_call_site, convert_to_eh_region_ranges, sjlj_size_of_call_site_table,
sjlj_output_call_site_table, output_function_exception_table,
* except.h (note_current_region_may_contain_throw): Remove
(get_exception_pointer, get_exception_filter): Do not take struct
function argument.
* Makefile.in (GTFILES): Put varargs before struct function.
From-SVN: r134328
2008-04-15 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
PR ada/22387
* exp_ch5.adb (Expand_Assign_Record): Within an initialization
procedure for a derived type retrieve the discriminant values from
the parent using the corresponding discriminant.
2008-04-15 Samuel Tardieu <sam@rfc1149.net>
gcc/testsuite/
PR ada/22387
* gnat.dg/specs/corr_discr.ads: New.
From-SVN: r134326
* tree-ssa-structalias.c (get_constraint_for_component_ref): Do not
punt for STRING_CST.
(get_constraint_for): Deal with STRING_CST here instead.
From-SVN: r134325
2008-04-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-propagate.c (substitute_and_fold): Substitute
statements in a basic-block with a backward walk. Do not
substitute into dead statements but instead remove those.
* gcc.dg/fold-compare-2.c: Adjust testcase.
* gcc.dg/tree-ssa/pr21086.c: Likewise.
From-SVN: r134322
PR c/35751
* c-decl.c (finish_decl): If extern or static var has variable
size, set TREE_TYPE (decl) to error_mark_node.
* decl.c (layout_var_decl): If extern or static var has variable
size, set TREE_TYPE (decl) to error_mark_node.
* gcc.dg/gomp/pr35751.c: New test.
* g++.dg/gomp/pr35751.C: New test.
From-SVN: r134317
2008-04-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.h (vn_reference_lookup): Adjust prototype.
* tree-ssa-sccvn.c (vn_reference_lookup): New parameter maywalk.
(visit_reference_op_load): Do walk vuse-vdef chains on
vn_reference_lookup.
(visit_reference_op_store): But do not here.
* tree-vn.c (vn_lookup): Do not walk vuse-vdef chains on
vn_reference_lookup.
(vn_lookup_with_vuses): But do so here.
From-SVN: r134314
2008-04-15 Samuel Tardieu <sam@rfc1149.net>
Gary Dismukes <dismukes@adacore.com>
gcc/ada/
PR ada/28733
* sem_ch8.adb (Analyze_Use_Package): Do not allow "use" of something
which is not an entity (and hence not a package).
(End_Use_Package): Ditto.
Co-Authored-By: Gary Dismukes <dismukes@adacore.com>
From-SVN: r134313
2008-04-15 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
PR ada/16086
* sem_ch12.adb (Analyze_Formal_Subprogram): The default can be any
protected operation that matches the signature, not only an entry, a
regular subprogram or a literal.
2008-04-15 Samuel Tardieu <sam@rfc1149.net>
gcc/testsuite/
PR ada/16086
* gnat.dg/prot_def.adb: New.
From-SVN: r134312
* ada-tree.h (DECL_BY_COMPONENT_PTR_P): Use DECL_LANG_FLAG_3.
* decl.c (gnat_to_gnu_entity) <object>: Call maybe_pad_type only
if a size or alignment is specified. Do not take into account
alignment promotions for the computation of the object's size.
<type>: Call maybe_pad_type only if a size or alignment is specified.
(maybe_pad_type): Really reuse the RM_Size of the original type if
requested.
* trans.c (Attribute_to_gnu): Fix a couple of nits.
* utils2.c (build_binary_op) <MODIFY_EXPR>: Merge related conditional
statements. Use the padded view of the type when copying between
padded objects of the same underlying type.
From-SVN: r134310
2008-04-14 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/35816
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Set CXXFLAGS to
-O0 when checking for atomic builtins.
* configure: Regenerate.
From-SVN: r134297
2008-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32972
* intrinsics/spread_generic.c (spread): Use spread_i2()
for GFC_DTYPE_DERIVED_2 (fix typo from previous commit).
From-SVN: r134286
2008-04-14 Robert Dewar <dewar@adacore.com>
gcc/ada/
* sem_prag.adb (Analyze_Pragma, Linker_Section case): Extend error
to every non-object and change error message.
gcc/testsuite/
* gnat.dg/specs/linker_section.ads: Check for more error conditions.
From-SVN: r134280
gcc/ada/
PR ada/15915
* sem_util.ads, sem_util.adb (Denotes_Variable): New function.
* sem_ch12.adb (Instantiate_Object): Use it.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ensure that
storage pool denotes a variable as per RM 13.11(15).
gcc/testsuite/
PR ada/15915
* gnat.dg/specs/storage.ads: New.
From-SVN: r134261
2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/35882
* options.c (gfc_init_options): Set the default maximum continuation
lines to 255 for both free and fixed form source for warnings.
(gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
the -std=f95 free form max continuations to 39 for warnings.
* scanner.c (gfc_next_char_literal): Adjust the current_line number only
if it is less than the current locus.
Co-Authored-By: Tobias Burnus <burnus@net-b.de>
From-SVN: r134251