platform/upstream/gcc.git
11 years agovect9.adb: Add -w to dg-options.
Eric Botcazou [Sun, 9 Dec 2012 14:43:34 +0000 (14:43 +0000)]
vect9.adb: Add -w to dg-options.

* gnat.dg/vect9.adb: Add -w to dg-options.
* gnat.dg/vect10.adb: Likewise.

From-SVN: r194331

11 years agolibstdc++.exp (dg-test): Unset testname_with_flags after running the test.
Andreas Schwab [Sun, 9 Dec 2012 14:31:27 +0000 (14:31 +0000)]
libstdc++.exp (dg-test): Unset testname_with_flags after running the test.

* testsuite/lib/libstdc++.exp (dg-test): Unset testname_with_flags
after running the test.

From-SVN: r194330

11 years agore PR fortran/55593 (Bogus error on passing DO LOOP variable)
Thomas Koenig [Sun, 9 Dec 2012 09:15:36 +0000 (09:15 +0000)]
re PR fortran/55593 (Bogus error on passing DO LOOP variable)

2012-12-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/55593
* frontend-passes.c (doloop_code):  Use resolved_sym
instead of n.sym->formal for formal argument list
to get the correct version for all generic subroutines.

2012-12-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/55593
* gfortran.dg/do_check_8.f90:  New test.

From-SVN: r194329

11 years agoDaily bump.
GCC Administrator [Sun, 9 Dec 2012 00:18:36 +0000 (00:18 +0000)]
Daily bump.

From-SVN: r194328

11 years agoFix typo
Eric Botcazou [Sat, 8 Dec 2012 18:07:14 +0000 (18:07 +0000)]
Fix typo

From-SVN: r194325

11 years agolto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of variables in...
Eric Botcazou [Sat, 8 Dec 2012 15:53:39 +0000 (15:53 +0000)]
lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of variables in the global contant pool.

* lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of
variables in the global contant pool.

From-SVN: r194324

11 years agotrans.c (gnat_to_gnu): Assert that the type of the prefix is ultimately an array.
Eric Botcazou [Sat, 8 Dec 2012 12:13:44 +0000 (12:13 +0000)]
trans.c (gnat_to_gnu): Assert that the type of the prefix is ultimately an array.

* gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Assert
that the type of the prefix is ultimately an array.

From-SVN: r194323

11 years agore PR rtl-optimization/55158 (segfault in schedule_region at -O3)
Steven Bosscher [Sat, 8 Dec 2012 12:12:50 +0000 (12:12 +0000)]
re PR rtl-optimization/55158 (segfault in schedule_region at -O3)

PR rtl-optimization/55158
* sched-rgn.c (bb_state_array, bb_state): Add some explaining
comment, and initialize to NULL explicitly.
(realloc_bb_state_array): New function.
(free_bb_state_array): New function.
(schedule_region): Call realloc_bb_state_array after schedule_block.
(sched_rgn_init): Use realloc_bb_state_array to initialize bb_state.
(sched_rgn_finish): Use free_bb_state_array to free it.

From-SVN: r194322

11 years agotrans.c (Subprogram_Body_to_gnu): Be prepared for a by-ref VAR_DECL in the case of...
Eric Botcazou [Sat, 8 Dec 2012 11:57:15 +0000 (11:57 +0000)]
trans.c (Subprogram_Body_to_gnu): Be prepared for a by-ref VAR_DECL in the case of an Out parameter passed by copy.

* gcc-interface/trans.c (Subprogram_Body_to_gnu): Be prepared for a
by-ref VAR_DECL in the case of an Out parameter passed by copy.

From-SVN: r194321

11 years ago* tree-ssa-loop-im.c (for_each_index) <CONST_DECL>: New case.
Eric Botcazou [Sat, 8 Dec 2012 11:44:05 +0000 (11:44 +0000)]
* tree-ssa-loop-im.c (for_each_index) <CONST_DECL>: New case.

From-SVN: r194320

11 years agore PR c++/55127 (Incorrect "dependent scope" error with partial specialization of...
Jason Merrill [Sat, 8 Dec 2012 03:31:37 +0000 (22:31 -0500)]
re PR c++/55127 (Incorrect "dependent scope" error with partial specialization of non-type parameter)

PR c++/55127
* search.c (accessible_in_template_p): New.
* cp-tree.h: Declare it.
* pt.c (instantiation_dependent_scope_ref_p): New.
(value_dependent_expression_p): Use it.
(instantiation_dependent_r): Likewise.
* semantics.c (finish_decltype_type): Handle SCOPE_REF.

From-SVN: r194318

11 years agore PR c++/55419 (ICE in gimplify_init_ctor_preeval, at gimplify.c:3587)
Jason Merrill [Sat, 8 Dec 2012 03:31:25 +0000 (22:31 -0500)]
re PR c++/55419 (ICE in gimplify_init_ctor_preeval, at gimplify.c:3587)

PR c++/55419
* tree.c (build_target_expr): Don't set TREE_CONSTANT.

From-SVN: r194317

11 years agore PR c++/55513 (Incorrect snprintf folding when building with -std=c++0x)
Aldy Hernandez [Sat, 8 Dec 2012 01:19:13 +0000 (01:19 +0000)]
re PR c++/55513 (Incorrect snprintf folding when building with -std=c++0x)

PR c++/55513
* semantics.c (cxx_eval_builtin_function_call): Set non_constant_p
after folding.

From-SVN: r194316

11 years agoDaily bump.
GCC Administrator [Sat, 8 Dec 2012 00:20:49 +0000 (00:20 +0000)]
Daily bump.

From-SVN: r194315

11 years agotree.c (build_aggr_init_expr): Remove tsubst_flags_t parameter.
Paolo Carlini [Fri, 7 Dec 2012 23:17:14 +0000 (23:17 +0000)]
tree.c (build_aggr_init_expr): Remove tsubst_flags_t parameter.

2012-12-07  Paolo Carlini  <paolo.carlini@oracle.com>

* tree.c (build_aggr_init_expr): Remove tsubst_flags_t parameter.
(build_cplus_new): Adjust.
* cp-tree.h: Adjust declaration.
* init.c (build_value_init): Adjust.

From-SVN: r194312

11 years agotoplev.c (process_options): Do not warn when -ffunction-sections and -fprofile are...
Sriraman Tallam [Fri, 7 Dec 2012 22:46:35 +0000 (22:46 +0000)]
toplev.c (process_options): Do not warn when -ffunction-sections and -fprofile are used together.

2012-12-07  Sriraman Tallan  <tmsriram@google.com>

* toplev.c (process_options): Do not warn when -ffunction-sections
and -fprofile are used together.

From-SVN: r194311

11 years ago* ree.c (struct ext_cand): Remove GTY markers.
Steven Bosscher [Fri, 7 Dec 2012 22:29:01 +0000 (22:29 +0000)]
* ree.c (struct ext_cand): Remove GTY markers.

From-SVN: r194310

11 years agodiscr38.adb: Don't use ^M line endings.
Mike Stump [Fri, 7 Dec 2012 21:26:20 +0000 (21:26 +0000)]
discr38.adb: Don't use ^M line endings.

2012-12-07  Mike Stump  <mikestump@comcast.net>

    * gnat.dg/discr38.adb: Don't use ^M line endings.
    gnat.dg/loop_optimization13.adb: Likewise.
    gnat.dg/loop_optimization13.ads: Likewise.
    gnat.dg/discr36_pkg.adb: Likewise.
    gnat.dg/discr36_pkg.ads: Likewise.
    gnat.dg/loop_optimization11_pkg.ads: Likewise.
    gnat.dg/discr36.ads: Likewise.
    gnat.dg/loop_optimization11.adb: Likewise.

From-SVN: r194309

11 years agore PR rtl-optimization/55141 (wrong code with -fno-split-wide-types)
Vladimir Makarov [Fri, 7 Dec 2012 21:06:38 +0000 (21:06 +0000)]
re PR rtl-optimization/55141 (wrong code with -fno-split-wide-types)

2012-12-07  Vladimir Makarov  <vmakarov@redhat.com>

testsuite/gcc.target/i386/pr55141.c
* lra-constraints.c (lra_constraints): Use biggest mode for
df_set_regs_ever_live.

2012-12-07  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/55141
* gcc.target/i386/pr55141.c: New.

From-SVN: r194308

11 years agoPR c++/54401 - Confusing diagnostics about type-alias at class scope
Dodji Seketeli [Fri, 7 Dec 2012 17:05:19 +0000 (17:05 +0000)]
PR c++/54401 - Confusing diagnostics about type-alias at class scope

Consider this invalid example given in the PR, where T is not defined:

     1 template<typename>
     2 struct X {
     3     using type = T;
     4 };

g++ yields the confusing diagnostics:

test.cc:3:10: error: expected nested-name-specifier before 'type'
    using type = T;
          ^
test.cc:3:10: error: using-declaration for non-member at class scope
test.cc:3:15: error: expected ';' before '=' token
    using type = T;
               ^
test.cc:3:15: error: expected unqualified-id before '=' token

I think this is because in cp_parser_member_declaration we tentatively
parse an alias declaration; we then have a somewhat meaningful
diagnostic which alas is not emitted because we are parsing
tentatively.  As the parsing didn't succeed (because the input is
invalid) we try to parse a using declaration, which fails as well; but
then the diagnostic emitted is the one for the failed attempt at
parsing a using declaration, not an alias declaration.  Oops.

The idea of this patch is to commit the tentative parse when we see
the '=' token in the alias-declaration.  That way any error encounter
after that token is reported to the user.

We are now getting the following output:

    test.cc:3:18: erreur: expected type-specifier before â€˜T’
 using type = T;
      ^
    test.cc:3:18: erreur: â€˜T’ does not name a type

I don't really like the "before 'T'" there, but I think we maybe could
revisit the format of what cp_parser_error emits in general, now that
we have caret diagnostics;  We could maybe do away with the "before T"
altogether?

In the mean time, it seems to me that this patch brings an improvement
over what we already have in trunk, and the issue above could be
addressed separately.

Tested on x86_64-unknown-linux-gnu against trunk.

gcc/cp/

* parser.c (cp_parser_alias_declaration): Commit to tentative
parse when see the '=' token.  Get out if the type-id is invalid.
Update function comment.
(cp_parser_member_declaration): Don't try to parse a using
declaration if we know that we expected an alias declaration; that
is, if we see the '=' token after the identifier.

gcc/testsuite/

* g++.dg/cpp0x/alias-decl-28.C: New test.
* g++.dg/cpp0x/alias-decl-16.C: Update.

From-SVN: r194306

11 years agotree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add UPPER_BOUND parameter.
Jan Hubicka [Fri, 7 Dec 2012 17:02:20 +0000 (18:02 +0100)]
tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add UPPER_BOUND parameter.

  * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add UPPER_BOUND
  parameter.
  (try_unroll_loop_completely) Update.

From-SVN: r194305

11 years agore PR fortran/55395 (libgfortran bootstrap failure on powerpc-linux-gnu and arm-linux...
Jakub Jelinek [Fri, 7 Dec 2012 16:04:26 +0000 (17:04 +0100)]
re PR fortran/55395 (libgfortran bootstrap failure on powerpc-linux-gnu and arm-linux-gnueabi)

PR fortran/55395
* varpool.c (varpool_remove_node): Don't drop DECL_INITIAL
for -g for any kind of debug info.

From-SVN: r194304

11 years agore PR bootstrap/54926 (Bootstrap comparison failure for various files in libbacktrace)
Jakub Jelinek [Fri, 7 Dec 2012 14:14:25 +0000 (15:14 +0100)]
re PR bootstrap/54926 (Bootstrap comparison failure for various files in libbacktrace)

PR bootstrap/54926
* Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
* Makefile.in: Regenerated.

From-SVN: r194303

11 years agore PR tree-optimization/54886 (FAIL: gcc.dg/graphite/pr(42521|42771).c (internal...
Richard Biener [Fri, 7 Dec 2012 13:16:28 +0000 (13:16 +0000)]
re PR tree-optimization/54886 (FAIL: gcc.dg/graphite/pr(42521|42771).c (internal compiler error) due to revision 192219)

2012-12-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/54886
* graphite-sese-to-poly.c (build_loop_iteration_domains): Properly
free all memory.

From-SVN: r194302

11 years agore PR middle-end/55078 (FAIL: g++.dg/torture/pr46154.C)
Martin Jambor [Fri, 7 Dec 2012 13:05:52 +0000 (14:05 +0100)]
re PR middle-end/55078 (FAIL: g++.dg/torture/pr46154.C)

2012-12-07  Martin Jambor  <mjambor@suse.cz>

PR middle-end/55078
* ipa-inline-transform.c (inline_call): Turn #if 0 to #ifdef
ENABLE_CHECKING.
* ipa-prop.c (try_make_edge_direct_simple_call): Use
ipa_value_from_jfunc.
(try_make_edge_direct_virtual_call): Likewise.
(update_indirect_edges_after_inlining): Lookup new_root_info and pass
it to the functions above.

From-SVN: r194301

11 years agore PR tree-optimization/55590 (SRA still produces unnecessarily unaligned memory...
Martin Jambor [Fri, 7 Dec 2012 12:50:43 +0000 (13:50 +0100)]
re PR tree-optimization/55590 (SRA still produces unnecessarily unaligned memory accesses)

2012-12-07  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/55590
* tree-sra.c (build_ref_for_offset): Use get_object_alignment_1 to
get base alignment.

* testsuite/gcc.target/i386/pr55590-1.c: New test.
* testsuite/gcc.target/i386/pr55590-2.c: Likewise.

From-SVN: r194300

11 years ago* config/i386/i386.c (legitimize_tls_address): Reorganize a tiny bit.
Uros Bizjak [Fri, 7 Dec 2012 11:02:37 +0000 (12:02 +0100)]
* config/i386/i386.c (legitimize_tls_address): Reorganize a tiny bit.

From-SVN: r194299

11 years agore PR c++/54975 (cv-qualifiers of typedef-name are ignored in lambda expression)
Paolo Carlini [Fri, 7 Dec 2012 09:53:04 +0000 (09:53 +0000)]
re PR c++/54975 (cv-qualifiers of typedef-name are ignored in lambda expression)

2012-12-07  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/54975
* g++.dg/cpp0x/lambda/lambda-typedef.C: New.

From-SVN: r194297

11 years agore PR c++/54325 (C++11 uniform initialization syntax for argument-less abstract base...
Jason Merrill [Fri, 7 Dec 2012 04:54:27 +0000 (23:54 -0500)]
re PR c++/54325 (C++11 uniform initialization syntax for argument-less abstract base class constructor fails)

PR c++/54325
* tree.c (build_aggr_init_expr): Don't check for abstract class.

From-SVN: r194284

11 years agoadd PR 55245 marker
Jason Merrill [Fri, 7 Dec 2012 04:54:12 +0000 (23:54 -0500)]
add PR 55245 marker

From-SVN: r194283

11 years agore PR c++/55058 (Unexpected invalid type conversion error)
Jason Merrill [Fri, 7 Dec 2012 04:53:59 +0000 (23:53 -0500)]
re PR c++/55058 (Unexpected invalid type conversion error)

PR c++/55058
* pt.c (tsubst): Keep the quals when looking through a typedef.

From-SVN: r194282

11 years agore PR c++/55249 (Multiple copy constructors for template class lead to link errors)
Jason Merrill [Fri, 7 Dec 2012 04:53:46 +0000 (23:53 -0500)]
re PR c++/55249 (Multiple copy constructors for template class lead to link errors)

PR c++/55249
* tree.c (build_vec_init_elt): Use the type of the initializer.

From-SVN: r194281

11 years agoDaily bump.
GCC Administrator [Fri, 7 Dec 2012 00:18:45 +0000 (00:18 +0000)]
Daily bump.

From-SVN: r194278

11 years agore PR middle-end/55597 (internal compiler error: in plus_constant, at explow.c:88)
Uros Bizjak [Thu, 6 Dec 2012 22:05:21 +0000 (23:05 +0100)]
re PR middle-end/55597 (internal compiler error: in plus_constant, at explow.c:88)

PR target/55597
* config/i386/i386.c (legitimize_tls_address): Zero-extend x to Pmode,
before using it as insn or call equivalent.

testsuite/ChangeLog:

PR target/55597
* gcc.target/i386/pr55597.c: New test.

From-SVN: r194274

11 years agoconfigure.tgt: Enable build on powerpc*-linux.
Peter Bergner [Thu, 6 Dec 2012 21:53:36 +0000 (15:53 -0600)]
configure.tgt: Enable build on powerpc*-linux.

libsanitizer/
* configure.tgt: Enable build on powerpc*-linux.

gcc/
* config/rs6000/sysv4.h (TARGET_ASAN_SHADOW_OFFSET): Define.
* config/rs6000/rs6000.c (rs6000_asan_shadow_offset): New function.
* config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Disable if using ASAN.

From-SVN: r194273

11 years agore PR fortran/55395 (libgfortran bootstrap failure on powerpc-linux-gnu and arm-linux...
Jakub Jelinek [Thu, 6 Dec 2012 20:34:55 +0000 (21:34 +0100)]
re PR fortran/55395 (libgfortran bootstrap failure on powerpc-linux-gnu and arm-linux-gnueabi)

PR fortran/55395
* varpool.c (varpool_remove_node): Don't drop DECL_INITIAL
if -g and emitting DWARF2+.

From-SVN: r194272

11 years agors6000.c (rs6000_option_override_internal): Set default loop peeling limits.
Pat Haugen [Thu, 6 Dec 2012 20:32:37 +0000 (20:32 +0000)]
rs6000.c (rs6000_option_override_internal): Set default loop peeling limits.

* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
default loop peeling limits.

From-SVN: r194271

11 years agore PR c++/54744 (internal compiler error: Segmentation fault, by dependent base,...
Jason Merrill [Thu, 6 Dec 2012 20:21:08 +0000 (15:21 -0500)]
re PR c++/54744 (internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer)

PR c++/54744
* pt.c (resolve_typename_type): Check TYPENAME_IS_RESOLVING_P on scope.
* init.c (expand_member_init): Check for being in a template first.
* parser.c (cp_parser_mem_initializer_list): Only check class types
for equivalence to the current class.

From-SVN: r194267

11 years agore PR c++/54913 (qualified lookup in ctor of class template fails to find static...
Jason Merrill [Thu, 6 Dec 2012 20:20:52 +0000 (15:20 -0500)]
re PR c++/54913 (qualified lookup in ctor of class template fails to find static member of reference type)

PR c++/54913
* semantics.c (finish_qualified_id_expr): convert_from_reference
after building a SCOPE_REF.

From-SVN: r194266

11 years agore PR c++/55032 (Internal compiler error: in strip_typedefs, at cp/tree.c:1199)
Jason Merrill [Thu, 6 Dec 2012 20:20:34 +0000 (15:20 -0500)]
re PR c++/55032 (Internal compiler error: in strip_typedefs, at cp/tree.c:1199)

PR c++/55032
* tree.c (build_array_type_1): Re-layout if we found it in the
hash table.

From-SVN: r194265

11 years agore PR c++/54207 ([C++0x] ICE in build_noexcept_spec when bool is #defined/typedef'd)
Jakub Jelinek [Thu, 6 Dec 2012 18:55:48 +0000 (19:55 +0100)]
re PR c++/54207 ([C++0x] ICE in build_noexcept_spec when bool is #defined/typedef'd)

PR c++/54207
* except.c (build_noexcept_spec): Avoid direct comparison
with boolean_true_node or boolean_false_node, instead use
operand_equal_p and/or INTEGER_CST check.
* pt.c (tsubst_exception_specification): Likewise.
* typeck2.c (merge_exception_specifiers): Likewise.

* g++.dg/cpp0x/noexcept18.C: New test.

From-SVN: r194263

11 years agore PR c++/55573 (ICE in adjust_temp_type, at cp/semantics.c:6454)
Jakub Jelinek [Thu, 6 Dec 2012 18:54:25 +0000 (19:54 +0100)]
re PR c++/55573 (ICE in adjust_temp_type, at cp/semantics.c:6454)

PR c++/55573
* semantics.c (adjust_temp_type): Handle VECTOR_CST.

* g++.dg/cpp0x/constexpr-55573.C: New test.

From-SVN: r194262

11 years agoFix PR55599/sanitizer by disabling static libasan on darwin
Jack Howarth [Thu, 6 Dec 2012 14:49:44 +0000 (14:49 +0000)]
Fix PR55599/sanitizer by disabling static libasan on darwin

From-SVN: r194257

11 years agore PR c++/54947 ([C++11] lambda cannot capture-by-copy inside braced-init-list)
Jason Merrill [Thu, 6 Dec 2012 14:45:11 +0000 (09:45 -0500)]
re PR c++/54947 ([C++11] lambda cannot capture-by-copy inside braced-init-list)

PR c++/54947
* parser.c (cp_parser_initializer_list): Don't require an
expression in [] to be constant until we know it's a C99
designator.

From-SVN: r194256

11 years ago[libsanitizer] merge from upstream r169392
Kostya Serebryany [Thu, 6 Dec 2012 14:43:11 +0000 (14:43 +0000)]
[libsanitizer] merge from upstream r169392

From-SVN: r194255

11 years agore PR middle-end/43631 (var-tracking inserts notes with non-NULL BLOCK_FOR_INSN in...
Jakub Jelinek [Thu, 6 Dec 2012 14:37:59 +0000 (15:37 +0100)]
re PR middle-end/43631 (var-tracking inserts notes with non-NULL BLOCK_FOR_INSN in between basic blocks)

PR middle-end/43631
* var-tracking.c (emit_note_insn_var_location, emit_notes_in_bb):
Clear BLOCK_FOR_INSN on notes emitted in between basic blocks,
don't adjust BB_END when inserting note after BB_END of some bb.

From-SVN: r194252

11 years agore PR c++/55015 (Lambda functions not found at link time when declared in an inline...
Jason Merrill [Thu, 6 Dec 2012 14:37:13 +0000 (09:37 -0500)]
re PR c++/55015 (Lambda functions not found at link time when declared in an inline function)

PR c++/55015
PR c++/53821
* semantics.c (maybe_add_lambda_conv_op): Revert earlier change.
* decl.c (start_preparsed_function): Make local class methods comdat
in templates, too.

From-SVN: r194251

11 years agore PR c++/55137 (Unexpected static structure initialization)
Jakub Jelinek [Thu, 6 Dec 2012 14:37:09 +0000 (15:37 +0100)]
re PR c++/55137 (Unexpected static structure initialization)

PR c++/55137
* fold-const.c (fold_binary_loc) <associate>: Don't introduce
TREE_OVERFLOW through reassociation.  If type doesn't have defined
overflow, but one or both of the operands do, use the wrapping type
for reassociation and only convert to type at the end.

* g++.dg/opt/pr55137.C: New test.
* gcc.c-torture/execute/pr55137.c: New test.

From-SVN: r194250

11 years agore PR c++/54653 (tsubst_template_parms ICE)
Jason Merrill [Thu, 6 Dec 2012 14:37:04 +0000 (09:37 -0500)]
re PR c++/54653 (tsubst_template_parms ICE)

PR c++/54653
* parser.c (cp_parser_class_head): A partial specialization scope
counts as a template.
* pt.c (tsubst_template_parms): Handle template template parm parms.
(tsubst_decl) [TEMPLATE_DECL]: Handle getting a template template
argument back.

From-SVN: r194249

11 years agore PR c++/55564 (internal error using decltype of a template type parameter for late...
Jason Merrill [Thu, 6 Dec 2012 14:36:55 +0000 (09:36 -0500)]
re PR c++/55564 (internal error using decltype of a template type parameter for late-specified function result type)

PR c++/55564
* pt.c (unify) [ARRAY_TYPE]: Unify the element type before the bounds.

From-SVN: r194248

11 years agogimple-fold.c (fold_stmt_1): Remove code handling folding stmts away.
Richard Biener [Thu, 6 Dec 2012 11:00:23 +0000 (11:00 +0000)]
gimple-fold.c (fold_stmt_1): Remove code handling folding stmts away.

2012-12-06  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (fold_stmt_1): Remove code handling folding
stmts away.

From-SVN: r194247

11 years agosourcebuild.texi: Document arm_v8_neon_ok.
Kyrylo Tkachov [Thu, 6 Dec 2012 10:07:41 +0000 (10:07 +0000)]
sourcebuild.texi: Document arm_v8_neon_ok.

2012-12-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

gcc/
* doc/sourcebuild.texi: Document arm_v8_neon_ok.

gcc/testsuite/
* lib/target-supports.exp (check_effective_target_arm_v8_neon_ok):
New procedure.
(add_options_for_arm_v8_neon): Likewise.

From-SVN: r194245

11 years agoarm.c (neon_itype): Define NEON_RINT enum element.
Kyrylo Tkachov [Thu, 6 Dec 2012 09:55:45 +0000 (09:55 +0000)]
arm.c (neon_itype): Define NEON_RINT enum element.

2012-12-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* config/arm/arm.c (neon_itype): Define NEON_RINT enum element.
(neon_builtin_data): Register vrintn, vrinta, vrintp, vrintm,
vrintz, vrintx neon builtins.
(arm_init_neon_builtins): Handle NEON_RINT.
(arm_expand_neon_builtin): Likewise.
* config/arm/unspecs.md: New file.
* config/arm/arm.md ("unspec"): Move to unspecs.md.
* config/arm/iterators.md (NEON_VRINT): New int iterator.
(nvrint_variant): New int attribute.
* config/arm/neon.md
(neon_vrint<NEON_VRINT:nvrint_variant><VCVTF:mode>): New pattern.
("unspec"): Move to unspecs.md.
* config/arm/iwmmxt2.md ("unspec"): Move to unspecs.md.

From-SVN: r194244

11 years agosfp-machine.h (FP_EX_ALL): Define.
Uros Bizjak [Thu, 6 Dec 2012 09:49:43 +0000 (10:49 +0100)]
sfp-machine.h (FP_EX_ALL): Define.

* config/i386/sfp-machine.h (FP_EX_ALL): Define.
(FP_TRAPPING_EXCEPTIONS): Define.
* config/i386/32/sfp-machine.h (FP_EX_SHIFT): Define.
* config/i386/64/sfp-machine.h (FP_EX_SHIFT): Ditto.

From-SVN: r194243

11 years agocompiler: Correct test for whether go/defer arg is parenthesized.
Ian Lance Taylor [Thu, 6 Dec 2012 04:11:54 +0000 (04:11 +0000)]
compiler: Correct test for whether go/defer arg is parenthesized.

From-SVN: r194240

11 years agoos: Clean up directory reading code.
Ian Lance Taylor [Thu, 6 Dec 2012 02:00:13 +0000 (02:00 +0000)]
os: Clean up directory reading code.

From-SVN: r194237

11 years agopa.md: Use "const_int 0" instead of match_test to simplify opaque cond in all call...
John David Anglin [Thu, 6 Dec 2012 01:38:00 +0000 (01:38 +0000)]
pa.md: Use "const_int 0" instead of match_test to simplify opaque cond in all call insns.

* config/pa/pa.md: Use "const_int 0" instead of match_test to simplify
opaque cond in all call insns.

From-SVN: r194235

11 years agoDaily bump.
GCC Administrator [Thu, 6 Dec 2012 00:18:38 +0000 (00:18 +0000)]
Daily bump.

From-SVN: r194234

11 years ago* g++.dg/pr55604.C: New test.
Steven Bosscher [Wed, 5 Dec 2012 23:57:17 +0000 (23:57 +0000)]
* g++.dg/pr55604.C: New test.

From-SVN: r194231

11 years agore PR rtl-optimization/55604 (ICE while dumping in remove_some_program_points_and_upd...
Steven Bosscher [Wed, 5 Dec 2012 23:55:28 +0000 (23:55 +0000)]
re PR rtl-optimization/55604 (ICE while dumping in remove_some_program_points_and_update_live_ranges)

PR rtl-optimization/55604
* lra-lives.c (lra_create_live_ranges): If there are no referenced
pseudos left, do not compute live ranges.

From-SVN: r194230

11 years agotm.texi.in (TARGET_CLASS_LIKELY_SPILLED_P): Update documentation.
Steven Bosscher [Wed, 5 Dec 2012 23:16:52 +0000 (23:16 +0000)]
tm.texi.in (TARGET_CLASS_LIKELY_SPILLED_P): Update documentation.

* doc/tm.texi.in (TARGET_CLASS_LIKELY_SPILLED_P): Update documentation.
* doc/tm.texi: Regenerate.
* regs.h (REG_LIVE_LENGTH): Update comments to not refer to no longer
existing files global.c and local-alloc.c.
* regmove.c (copy_src_to_dest): Likewise.
* function.h (struct rtl_data): Likewise.
* ira-color.c (allocno_priority_compare_func): Likewise.
* regstat.c (regstat_compute_ri): Likewise.
* config/epiphany/epiphany.h, config/vax/vax.h, config/cris/cris.h,
config/h8300/h8300.h, config/alpha/alpha.h, config/sparc/sparc.h,
config/rs6000/rs6000.h, config/pdp11/pdp11.h, config/pa/pa.h,
config/v850/v850.h, config/mn10300/mn10300.h, config/m32r/m32r.h,
config/i386/i386.h, config/mcore/mcore.h, config/sh/sh.h,
config/arm/arm.h (REGNO_OK_FOR_BASE_P): Likewise.

From-SVN: r194229

11 years agore PR target/54160 (gcc should not define __OBJC2__ when lang is not set to ObjC...
Aldy Hernandez [Wed, 5 Dec 2012 21:10:18 +0000 (21:10 +0000)]
re PR target/54160 (gcc should not define __OBJC2__ when lang is not set to ObjC (gcc 4.6 and later))

PR target/54160
* config/t-darwin (darwin-c.o): Depend on $(CPP_INTERNAL_H).
* config/darwin-c.c (darwin_cpp_builtins): Only set __OBJC2__
when in obj mode.
Include libcpp/internal.h.

From-SVN: r194227

11 years agore PR rtl-optimization/54739 (FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1...
Michael Eager [Wed, 5 Dec 2012 17:27:05 +0000 (17:27 +0000)]
re PR rtl-optimization/54739 (FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg")

PR rtl-optimization/54739
* config/microblaze/microblaze.md: (anddi3, iordi3, xordi3): Delete patterns.

From-SVN: r194226

11 years agoresolve.c (generate_component_assignments): Fix memleak.
Tobias Burnus [Wed, 5 Dec 2012 15:45:32 +0000 (16:45 +0100)]
resolve.c (generate_component_assignments): Fix memleak.

2012-12-05  Tobias Burnus  <burnus@net-b.de>

        * resolve.c (generate_component_assignments): Fix memleak.

From-SVN: r194225

11 years ago[libsanitizer] merge from upstream r169371
Kostya Serebryany [Wed, 5 Dec 2012 13:19:55 +0000 (13:19 +0000)]
[libsanitizer] merge from upstream r169371

From-SVN: r194221

11 years ago[AARCH64] Add zip{1, 2}, uzp{1, 2}, trn{1, 2} support
James Greenhalgh [Wed, 5 Dec 2012 11:42:37 +0000 (11:42 +0000)]
[AARCH64] Add zip{1, 2}, uzp{1, 2}, trn{1, 2} support
for vector permute.

gcc/

* config/aarch64/aarch64-simd-builtins.def: Add new builtins.
* config/aarch64/aarch64-simd.md (simd_type): Add uzp.
(aarch64_<PERMUTE:perm_insn><PERMUTE:perm_hilo><mode>): New.
* config/aarch64/aarch64.c (aarch64_evpc_trn): New.
(aarch64_evpc_uzp): Likewise.
(aarch64_evpc_zip): Likewise.
(aarch64_expand_vec_perm_const_1): Check for trn, zip, uzp patterns.
* config/aarch64/iterators.md (unspec): Add neccessary unspecs.
(PERMUTE): New.
(perm_insn): Likewise.
(perm_hilo): Likewise.

From-SVN: r194219

11 years ago[AARCH64] Implement Vector Permute Support.
James Greenhalgh [Wed, 5 Dec 2012 11:36:00 +0000 (11:36 +0000)]
[AARCH64] Implement Vector Permute Support.

gcc/

* config/aarch64/aarch64-protos.h
(aarch64_split_combinev16qi): New.
(aarch64_expand_vec_perm): Likewise.
(aarch64_expand_vec_perm_const): Likewise.
* config/aarch64/aarch64-simd.md (vec_perm_const<mode>): New.
(vec_perm<mode>): Likewise.
(aarch64_tbl1<mode>): Likewise.
(aarch64_tbl2v16qi): Likewise.
(aarch64_combinev16qi): New.
* config/aarch64/aarch64.c
(aarch64_vectorize_vec_perm_const_ok): New.
(aarch64_split_combinev16qi): Likewise.
(MAX_VECT_LEN): Define.
(expand_vec_perm_d): New.
(aarch64_expand_vec_perm_1): Likewise.
(aarch64_expand_vec_perm): Likewise.
(aarch64_evpc_tbl): Likewise.
(aarch64_expand_vec_perm_const_1): Likewise.
(aarch64_expand_vec_perm_const): Likewise.
(aarch64_vectorize_vec_perm_const_ok): Likewise.
(TARGET_VECTORIZE_VEC_PERM_CONST_OK): Likewise.
* config/aarch64/iterators.md
(unspec): Add UNSPEC_TBL, UNSPEC_CONCAT.
(V_cmp_result): Add mapping for V2DF.

gcc/testsuite/

* lib/target-supports.exp
(check_effective_target_vect_perm): Allow aarch64*-*-*.
(check_effective_target_vect_perm_byte): Likewise.
(check_effective_target_vect_perm_short): Likewise.
(check_effective_target_vect_char_mult): Likewise.
(check_effective_target_vect_extract_even_odd): Likewise.
(check_effective_target_vect_interleave): Likewise.

From-SVN: r194218

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:25:23 +0000 (12:25 +0100)]
[multiple changes]

2012-12-05  Robert Dewar  <dewar@adacore.com>

* par_sco.adb, sem_prag.adb, put_scos.adb, get_scos.adb: Minor
reformatting.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb: Code clean up.

From-SVN: r194217

11 years agoMake-lang.in: Update dependencies.
Arnaud Charlet [Wed, 5 Dec 2012 11:24:07 +0000 (11:24 +0000)]
Make-lang.in: Update dependencies.

* gcc-interface/Make-lang.in: Update dependencies.
* gcc-interface/lang.opt: New language AdaSCIL.
* gcc-interface/lang-specs.h: Add specs for adascil language.

From-SVN: r194216

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:21:32 +0000 (12:21 +0100)]
[multiple changes]

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* par_sco.adb (Traverse_Aspects): Ensure we always have
an entry in the sloc -> SCO map for invariants, since
Set_SCO_Pragma_Enabled is called with that sloc when checks
are enabled.

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* exp_ch4.adb: Minor reformatting.

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* par-prag.adb: Checks and processing of pragma Assume are
carried out by Sem_Prag.
* sem_prag.adb (Analyze_Pragma): Check the legality of pragma
Assume.
* snames.ads-tmpl: Add new name Assume. Add a pragma identifier
for Assume.

From-SVN: r194215

11 years agoaspects.ads, [...]: Add aspect Relative_Deadline.
Ed Schonberg [Wed, 5 Dec 2012 11:20:13 +0000 (11:20 +0000)]
aspects.ads, [...]: Add aspect Relative_Deadline.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* aspects.ads, aspects.adb: Add aspect Relative_Deadline.
* sem_ch13.adb (Analyze_Aspect_Specifications): Process aspect
Relative_Deadline, and introduce the corresponding pragma within
the task definition of the task type to which it applies.
(Check_Aspect_At_Freeze_Point): Expression in a Relative_Deadline
aspect is of type Time_Span.

From-SVN: r194214

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:17:09 +0000 (12:17 +0100)]
[multiple changes]

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Check_Loop_Invariant_Variant_Placement): When pragma
Loop_[In]variant does not appear immediately within the statements
of a loop, it must appear in a chain of nested blocks.

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* sem_ch13.adb: Minor reformatting.
 Remove redundant assertion.

From-SVN: r194213

11 years agoMinor reformatting.
Arnaud Charlet [Wed, 5 Dec 2012 11:16:09 +0000 (12:16 +0100)]
Minor reformatting.

From-SVN: r194212

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:15:35 +0000 (12:15 +0100)]
[multiple changes]

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* par_sco.adb, scos.ads, put_scos.adb, put_scos.ads,
get_scos.adb: Generation of SCOs for aspects.

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* sem_prag.adb (Check_Precondition_Postcondition): Remove
redundant call to Set_SCO_Pragma_Enabled (the pragma will be
rewritten into a pragma Check later on, and the call will be
made when processing the rewritten pragma).
(Analyze_Pragma, case Pragma_Check): Omit call to
Set_SCO_Pragma_Enabled if Split_PPC is set.

2012-12-05  Olivier Hainque  <hainque@adacore.com>

* tracebak.c: Add partial support for Lynx178.

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_attr.adb (Analyze_Attribute): Improve
the error message related to loop assertions.

2012-12-05  Gary Dismukes  <dismukes@adacore.com>

* atree.ads: Minor reformatting.

From-SVN: r194211

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:11:28 +0000 (12:11 +0100)]
[multiple changes]

2012-12-05  Robert Dewar  <dewar@adacore.com>

* atree.ads, par-ch4.adb, sem_attr.adb, sem_ch13.adb: Minor
reformatting.

2012-12-05  Eric Botcazou  <ebotcazou@adacore.com>

* gnat_ugn.texi (Switches for gcc): Document -flto and reorder.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* par-ch5.adb (P_Condition): Handle properly Ada 2012
expressions that must be parenthesized before checking for
redundant parentheses when that check is enabled.

From-SVN: r194210

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:09:27 +0000 (12:09 +0100)]
[multiple changes]

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* par-ch4.adb (P_Allocator): In Ada 2012 (AI05-0104)  an
uninitialized allocator cannot carry an explicit not null
indicator.
* sem_ch4.adb (Analyze_Allocator): Remove code that implements
the check for AI05-0104, the check is syntactic and performed
in the parser.

2012-12-05  Geert Bosch  <bosch@adacore.com>

* sem_attr.adb (Analyze_Attribute): Use base type for floating
point attributes.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Analyze_Aspect_Specifications,
Ahalyze_Aspect_Default_Value): For a scalar type attach default
value to base type as well, because it is a type-specific aspect
even though it can be specified on a first subtype.

From-SVN: r194209

11 years agoaarch64.c (aarch64_simd_mangle_map_entry): New typedef.
Yufeng Zhang [Wed, 5 Dec 2012 11:08:43 +0000 (11:08 +0000)]
aarch64.c (aarch64_simd_mangle_map_entry): New typedef.

gcc/

2012-12-05  Yufeng Zhang  <yufeng.zhang@arm.com>

* config/aarch64/aarch64.c (aarch64_simd_mangle_map_entry): New
typedef.
(aarch64_simd_mangle_map): New table.
(aarch64_mangle_type): Locate and return the mangled name for
a given AdvSIMD vector type.

gcc/testsuite/

2012-12-05  Yufeng Zhang  <yufeng.zhang@arm.com>

* g++.dg/abi/mangle-neon-aarch64.C: New test.

From-SVN: r194208

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:06:35 +0000 (12:06 +0100)]
[multiple changes]

2012-12-05  Yannick Moy  <moy@adacore.com>

* urealp.ads: Minor rewording.

2012-12-05  Yannick Moy  <moy@adacore.com>

* aspects.ads (No_Duplicates_Allowed): Forbid use of duplicate
Contract_Cases aspects.
* sem_prag.adb (Analyze_Pragma/Pragma_Contract_Case): Rename
POST_CASE into CONTRACT_CASE in both grammar and code, to be
consistent with current language definition.  Issue a more precise
error message when the pragma duplicates another pragma or aspect.

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_attr.adb (Expand_N_Attribute_Reference): Add processing
for attribute Update.
(Expand_Update_Attribute): New routine.
* par-ch4.adb (P_Name): The sole expression of attribute Update
is an aggregate, parse it accordingly.
* sem_attr.adb (Analyze_Attribute): Verify the legality of
attribute Update.
(Eval_Attribute): Attribute Update does not
need evaluation because it is never static.
* snames.ads-tmpl: Add Name_Update to the list of special names
recognized by the compiler. Add an Attribute_Id for Update.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* exp_util.adb (Remove_Side_Effects): For purposes of removing
side effects, qualified expressions do not receive a special
treatment, even though in Ada 2012 they are defined  as object
references.

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* par-ch3.adb: Minor reformatting.

From-SVN: r194207

11 years agoexp_dist.adb (Build_From_Any_Call, [...]): For a used-defined subtype, always go...
Thomas Quinot [Wed, 5 Dec 2012 11:03:15 +0000 (11:03 +0000)]
exp_dist.adb (Build_From_Any_Call, [...]): For a used-defined subtype, always go to the first subtype of the base type.

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* exp_dist.adb (Build_From_Any_Call, Build_To_Any_Call,
Build_TypeCode_Call): For a used-defined subtype, always go to
the first subtype of the base type.

From-SVN: r194206

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 11:02:24 +0000 (12:02 +0100)]
[multiple changes]

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* exp_dist.adb: Minor reformatting.

2012-12-05  Tristan Gingold  <gingold@adacore.com>

* Make-generated.in: Remove the VMS host specific part, as VMS
compilers aren't built anymore on VMS.

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* sem.adb, errout.ads, atree.adb, atree.ads (Check_Error_Detected):
Only return quietly if a serious error of configurable run time
violation has been found.

2012-12-05  Yannick Moy  <moy@adacore.com>

* sem_res.adb (Resolve_Type_Conversion): In Alfa_Mode, do not apply
conversion checks.

From-SVN: r194205

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:59:09 +0000 (11:59 +0100)]
[multiple changes]

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* exp_ch5.adb (Expand_N_Assignment_Statement): Handle properly
the generation of discriminant checks when the left-hand side
has a type with hidden discriminants.
* sem_ch3.ads (Is_Visible_Component): Add defaulted parameter to
specify the node on which component visibility is being checked.
* sem_ch3.adb (Is_Visible_Component): Use new parameter to
determine whether the reference comes from a type conversion to
a full view of a private type with unknown discriminants.
* sem_ch4.adb (Analyze_Selected_Component): Call
Is_Visible_Component with added parameter.

2012-12-05  Arnaud Charlet  <charlet@adacore.com>

* make.adb: Minor comment update.

2012-12-05  Arnaud Charlet  <charlet@adacore.com>

* gnatlink.adb: Also use -x adascil in CodePeer mode when
calling gcc.
* exp_ch5.adb: Minor reformatting.

2012-12-05  Bob Duff  <duff@adacore.com>

* exp_ch4.adb: Minor comment.

2012-12-05  Bob Duff  <duff@adacore.com>

* par-ch4.adb: Set Paren_Count correctly for a parenthesized expression
containing a conditional expression or quantified expression.
* sprint.adb: Update comment.

2012-12-05  Bob Duff  <duff@adacore.com>

* style.adb, scans.ads, styleg.adb: Update comments.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch8.adb (Find_Selected_Component): Handle properly an
expanded name whose prefix is the expanded name of an enclosing
entry, that is to say a construct such as T.E.X, where T is an
enclosing concurrent type and E is an enclosing entry.

From-SVN: r194204

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:55:42 +0000 (11:55 +0100)]
[multiple changes]

2012-12-05  Robert Dewar  <dewar@adacore.com>

* lib-writ.adb (Write_ALI): Output T lines.
* lib-writ.ads: Minor reformatting. Add documentation of T lines.
* opt.ads (Generate_Target_Dependent_Info): New flag.
* switch-c.adb (Scan_Switches): Recognize -gnatet switch
(target dependent info).
* ttypes.ads: Add four letter codes to declarations (for target
dependent info).
* usage.adb: Add line for -gnatet switch.

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_prag.adb (Expand_N_Pragma): Add a call to expand
pragma Loop_Variant.
(Expand_Pragma_Loop_Assertion): Removed.
(Expand_Pragma_Loop_Variant): New routine.
* par-prag.adb: Remove Pragma_Loop_Assertion and add two new
Pragma_Loop_Invariant and Pragma_Loop_Variant entries.
* sem_attr.adb (Analyze_Attribute): Update the code which
locates the enclosing pragma.
* sem_prag.adb (Analyze_Pragma): Remove the code which analyzes
pragma Loop_Assertion as the pragma is now obsolete. Add the
machinery to checks the semantics of pragmas Loop_Invariant
and Loop_Variant.
(Check_Loop_Invariant_Variant_Placement): New routine.
* snames.ads-tmpl: Remove name Loop_Assertion. Add new names
Loop_Invariant and Loop_Variant.  Rename Name_Decreasing
to Name_Decreases and Name_Increasing to Name_Increases.
Remove the pragma Id for Loop_Assertion and add two new Ids for
Loop_Invariant and Loop_Variant.

From-SVN: r194203

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:50:26 +0000 (11:50 +0100)]
[multiple changes]

2012-12-05  Robert Dewar  <dewar@adacore.com>

* gnatchop.adb, sem_attr.ads, sem_ch4.adb, sem_ch6.adb, exp_disp.adb,
atree.adb, sem_eval.adb: Minor reformatting.

2012-12-05  Yannick Moy  <moy@adacore.com>

* uintp.adb (UI_Div_Rem): Correct algorithm D to remove potential
overflow.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* exp_ch4.adb (Expand_N_Op_Mod): Minor comment additions.
(Expand_N_Op_Rem): Ditto.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* sem_attr.adb: Minor reformatting.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* usage.adb: Update lines for -gnato? switch.

From-SVN: r194202

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:47:30 +0000 (11:47 +0100)]
[multiple changes]

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* par-ch6.adb (P_Return_Object_Declaration): Do not check for
legality of Aliased keyword.
* sem_ch6.adb (Analyze_Function_Return): The keyword aliased is
legal in an extended return statement only if the return type
is immutably limited.

2012-12-05  Javier Miranda  <miranda@adacore.com>

* exp_disp.adb (Expand_Interface_Thunk): Simplify
management of controlling formals.  Required to avoid problems
with primitives of internally generated base types associated
with constrained tagged types.

From-SVN: r194201

11 years agoaarch64.c (aarch64_mangle_type): New function.
Yufeng Zhang [Wed, 5 Dec 2012 10:43:48 +0000 (10:43 +0000)]
aarch64.c (aarch64_mangle_type): New function.

gcc/

2012-12-05  Yufeng Zhang  <yufeng.zhang@arm.com>

* config/aarch64/aarch64.c (aarch64_mangle_type): New function.
(TARGET_MANGLE_TYPE): Define.

gcc/testsuite/

2012-12-05  Yufeng Zhang  <yufeng.zhang@arm.com>

* g++.dg/abi/arm_va_list.C: Also test on aarch64*-*-*.

From-SVN: r194200

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:38:36 +0000 (11:38 +0100)]
[multiple changes]

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_eval.adb: Remove spurious warnings.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb (Build_Explicit_Dereference): Set properly
the type of the prefix prior to rewriting, because subsequent
legality checks examine the original node.

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb: Add Contract_Cases to the canonical aspects map.
* aspects.ads: Add aspect Contract_Cases in the various aspect
tables.
* par-prag.adb: The parser does not need to perform special
actions for pragma Contract_Cases.
* sem_ch6.adb (Expand_Contract_Cases): New routine.
(Process_Contract_Cases): Convert pragma Contract_Cases into pre-
and post- condition checks that verify the runtime state of all
case guards and their corresponding consequences.
* sem_ch13.adb (Analyze_Aspect_Specifications): Perform
various legality checks on aspect Contract_Cases. The aspect is
transformed into a pragma.
* sem_prag.adb: Add an entry in table Sig_Flags for pragma
Contract_Cases.
(Analyze_Pragma): Perform various legality
checks on pragma Contract_Cases.  The pragma is associated with
the contract of the related subprogram.
(Chain_CTC): Omit pragma
Contract_Cases because it does not introduce a unique case name
and does not follow the syntax of Contract_Case and Test_Case.
* snames.ads-tmpl: Add new name Name_Contract_Cases. Add a
Pragma_Id for Contract_Cases.

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* sem_ch5.adb: Minor reformatting.

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_attr.ads: Add an entry for attribute Loop_Entry in the
Attribute_Impl_Def table.

2012-12-05  Bob Duff  <duff@adacore.com>

* gnatchop.adb (Read_File): Avoid storage leak, and in most cases avoid
an extra copy of the string.

From-SVN: r194199

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:35:24 +0000 (11:35 +0100)]
[multiple changes]

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch5.adb (Preanalyze_Range): If the expression, which
denotes some domain of iteration, has a type with implicit
dereference, and does not have any iterable aspects, insert
dereference to obtain proper container type.

2012-12-05  Bob Duff  <duff@adacore.com>

* par-ch8.adb (P_Use_Type_Clause): Fix the Sloc for "use all type ..."
to point to "use".

2012-12-05  Arnaud Charlet  <charlet@adacore.com>

* make.adb (Compile): Always pass -x adascil in CodePeer mode.

From-SVN: r194198

11 years ago[AARCH64] Add support for vectorizable standard math patterns.
James Greenhalgh [Wed, 5 Dec 2012 10:34:31 +0000 (10:34 +0000)]
[AARCH64] Add support for vectorizable standard math patterns.

gcc/

* config/aarch64/aarch64-builtins.c
(aarch64_builtin_vectorized_function): New.
* config/aarch64/aarch64-protos.h
(aarch64_builtin_vectorized_function): Declare.
* config/aarch64/aarch64-simd-builtins.def (frintz, frintp): Add.
(frintm, frinti, frintx, frinta, fcvtzs, fcvtzu): Likewise.
(fcvtas, fcvtau, fcvtps, fcvtpu, fcvtms, fcvtmu): Likewise.
* config/aarch64/aarch64-simd.md
(aarch64_frint_<frint_suffix><mode>): New.
(<frint_pattern><mode>2): Likewise.
(aarch64_fcvt<frint_suffix><su><mode>): Likewise.
(l<fcvt_pattern><su_optab><fcvt_target><VDQF:mode>2): Likewise.
* config/aarch64/aarch64.c (TARGET_VECTORIZE_BUILTINS): Define.
(TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Likewise.
* config/aarch64/aarch64.md
(btrunc<mode>2, ceil<mode>2, floor<mode>2)
(round<mode>2, rint<mode>2, nearbyint<mode>2): Consolidate as...
(<frint_pattern><mode>2): ...this.
(lceil<su_optab><mode><mode>2, lfloor<su_optab><mode><mode>2)
(lround<su_optab><mode><mode>2)
(lrint<su_optab><mode><mode>2): Consolidate as...
(l<fcvt_pattern><su_optab><GPF:mode><GPI:mode>2): ... this.
* config/aarch64/iterators.md (fcvt_target): New.
(FCVT_TARGET): Likewise.
(FRINT): Likewise.
(FCVT): Likewise.
(frint_pattern): Likewise.
(frint_suffix): Likewise.
(fcvt_pattern): Likewise.

gcc/testsuite/

* gcc.dg/vect/vect-rounding-btrunc.c: New test.
* gcc.dg/vect/vect-rounding-btruncf.c: Likewise.
* gcc.dg/vect/vect-rounding-ceil.c: Likewise.
* gcc.dg/vect/vect-rounding-ceilf.c: Likewise.
* gcc.dg/vect/vect-rounding-floor.c: Likewise.
* gcc.dg/vect/vect-rounding-floorf.c: Likewise.
* gcc.dg/vect/vect-rounding-lceil.c: Likewise.
* gcc.dg/vect/vect-rounding-lfloor.c: Likewise.
* gcc.dg/vect/vect-rounding-nearbyint.c: Likewise.
* gcc.dg/vect/vect-rounding-nearbyintf.c: Likewise.
* gcc.dg/vect/vect-rounding-round.c: Likewise.
* gcc.dg/vect/vect-rounding-roundf.c: Likewise.
* target-supports.exp
(check_effective_target_vect_call_btrunc): New.
(check_effective_target_vect_call_btruncf): Likewise.
(check_effective_target_vect_call_ceil): Likewise.
(check_effective_target_vect_call_ceilf): Likewise.
(check_effective_target_vect_call_floor): Likewise.
(check_effective_target_vect_call_floorf): Likewise.
(check_effective_target_vect_call_lceil): Likewise.
(check_effective_target_vect_call_lfloor): Likewise.
(check_effective_target_vect_call_nearbyint): Likewise.
(check_effective_target_vect_call_nearbyintf): Likewise.
(check_effective_target_vect_call_round): Likewise.
(check_effective_target_vect_call_roundf): Likewise.

From-SVN: r194197

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:29:59 +0000 (11:29 +0100)]
[multiple changes]

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* s-rident.ads, restrict.ads: Remove discrepancies between the
documentation on implementation-defined restrictions, and
the internal data structure used for warnings and errors on
implementation-defined restriction violations.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_prag.adb (Chain_PPC): Pre- and postcondition aspects
are legal on a subprogram body that acts as a spec.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch8.adb (Find_Selected_Component): If the selector name is
an overloadable entity but the name is not overloaded, generate
reference to it rather than delaying this until resolution.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* checks.ads, checks.adb (Activate_Overflow_Check): No effect for
MOD/REM/unary +
* exp_ch4.adb (Expand_N_Op_Mod): Remove call to set Do_Overflow_Check.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch4.adb (Find_Non_Universal_Interpretation): Use the
types of the right operand if the left operand is null.

2012-12-05  Sergey Rybin  <rybin@adacore.com frybin>

* gnat_ugn.texi, vms_data.ads: document gnatpp -nn option.

2012-12-05  Jose Ruiz  <ruiz@adacore.com>

* init.c (__gnat_install_handler): For the LEON VxWorks kernel
run-time library we need to install a trap handler directly in the
trap table (no support by the OS) for the software trap 0.

From-SVN: r194196

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:26:14 +0000 (11:26 +0100)]
[multiple changes]

2012-12-05  Eric Botcazou  <ebotcazou@adacore.com>

* gnat_rm.texi (Interfacing to C++): Document new restrictions.

2012-12-05  Ben Brosgol  <brosgol@adacore.com>

* gnat_ugn.texi: Fix typo.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* gnatbind.adb: Minor reformatting.

From-SVN: r194195

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:24:18 +0000 (11:24 +0100)]
[multiple changes]

2012-12-05  Arnaud Charlet  <charlet@adacore.com>

* gnat_ugn.texi: Fix typo.

2012-12-05  Tristan Gingold  <gingold@adacore.com>

* gnatbind.adb: Minor comment update.

2012-12-05  Yannick Moy  <moy@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): Set flags to indicate that
CodePeer backend deals with divide and overflow checks.

From-SVN: r194194

11 years agognat_rm.texi: Update overflow description.
Robert Dewar [Wed, 5 Dec 2012 10:15:56 +0000 (10:15 +0000)]
gnat_rm.texi: Update overflow description.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* gnat_rm.texi: Update overflow description. Pragma Overflow_Checks
changed to Overflow_Mode.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* checks.ads, exp_ch4.adb, gnat1drv.adb, par-prag.adb, sem_prag.adb,
snames.ads-tmpl, switch-c.adb, types.ads, checks.adb: Change pragma
Overflow_Checks to Overflow_Mode.
Separate overflow checking from overflow mode.
Several name changes to reflect this separation.
CHECKED mode is renamed STRICT mode.

From-SVN: r194193

11 years agore PR tree-optimization/51238 (ICE: SIGSEGV in find_uses_to_rename_use (tree-ssa...
Richard Biener [Wed, 5 Dec 2012 10:12:53 +0000 (10:12 +0000)]
re PR tree-optimization/51238 (ICE: SIGSEGV in find_uses_to_rename_use (tree-ssa-loop-manip.c:1267) with -Os -ftree-loop-distribution)

2012-12-05  Richard Biener  <rguenther@suse.de>

PR tree-optimization/51238
* gcc.dg/torture/pr51238.c: New testcase.

From-SVN: r194192

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:12:49 +0000 (11:12 +0100)]
[multiple changes]

2012-12-05  Yannick Moy  <moy@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): Move setting of flags for
Alfa mode before general treatment of flags, so that overflow checks
settings are set appropriately in Alfa mode. Also set the mode to
STRICT in Alfa mode if not already set by the user.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* sem_ch3.adb: Minor reformatting.

2012-12-05  Steve Baird  <baird@adacore.com>

* sinfo.ads: Improve comments about SCIL-related node kinds and selector
functions.

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch10.adb (Build_Limited_Views): Even though the unit is
not analyzed, place its entity on the name in the with clause,
so that warnings on unused with-clause are properly supported
for limited withs.

2012-12-05  Robert Dewar  <dewar@adacore.com>

* gnat_ugn.texi: Update overflow description. Pragma
Overflow_Checks changed to Overflow_Mode.

From-SVN: r194191

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:10:04 +0000 (11:10 +0100)]
[multiple changes]

2012-12-05  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Build_Derived_Private_Type): Handle properly a
completion in a grand-child unit when the parent type is itself
a private type in a child unit whose full view is itself a
derivation from a private type.

2012-12-05  Gary Dismukes  <dismukes@adacore.com>

* exp_attr.adb (Expand_N_Attribute_Reference, case
Attribute_Valid): Remove code for issuing warning on Valid within
a predicate. Moved to Sem_Attr.  Remove with and use of Errout.
* sem_attr.adb (Analyze_Attribute, case Attribute_Valid):
Test for prefix's subtype having a predicate and issue warning
about infinite recursion if Valid occurs within the subtype's
predicate. Warning moved here from Exp_Attr.

2012-12-05  Yannick Moy  <moy@adacore.com>

* debug.adb: Minor comment addition.

2012-12-05  Yannick Moy  <moy@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): In CodePeer mode, check
overflows by default, even when the user suppresses overflow checks.

From-SVN: r194190

11 years ago[multiple changes]
Arnaud Charlet [Wed, 5 Dec 2012 10:06:51 +0000 (11:06 +0100)]
[multiple changes]

2012-12-05  Thomas Quinot  <quinot@adacore.com>

* err_vars.ads: Fix minor typo in comment.

2012-12-05  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_attr.adb (Analyze_Attribute): Do not analyze the attribute
arguments when processing Loop_Entry. Rewrite the analysis of
attribute Loop_Entry to handle an optional loop name.
(Convert_To_Indexed_Component): New routine.
(Eval_Attribute): Remove ??? comment and explain
why Loop_Entry does not need to be evaluated.

From-SVN: r194189

11 years agore PR tree-optimization/50222 (ICE with -O{1,2} -funswitch-loops -ftree-loop-distribu...
Richard Biener [Wed, 5 Dec 2012 09:59:08 +0000 (09:59 +0000)]
re PR tree-optimization/50222 (ICE with -O{1,2} -funswitch-loops -ftree-loop-distribution)

2012-12-05  Richard Biener  <rguenther@suse.de>

PR tree-optimization/50222
* gcc.dg/torture/pr50222.c: New testcase.

From-SVN: r194188

11 years agopasses.c (pass_init_dump_file): Only open a clean graph dump file if the dump was...
Steven Bosscher [Wed, 5 Dec 2012 09:34:06 +0000 (09:34 +0000)]
passes.c (pass_init_dump_file): Only open a clean graph dump file if the dump was not already initialized.

* passes.c (pass_init_dump_file): Only open a clean graph dump file if
the dump was not already initialized.

Revert:
2012-12-03  Steven Bosscher  <steven@gcc.gnu.org>
* passes.c (finish_optimization_passes): Don't finish graph dumps here.
(pass_fini_dump_file): Wrap in TV_DUMP.  Finish graph dumps.
(execute_one_pass): Don't set up graph dumps here.

From-SVN: r194186

11 years agosyscall: Fix splice syscall.
Ian Lance Taylor [Wed, 5 Dec 2012 08:49:01 +0000 (08:49 +0000)]
syscall: Fix splice syscall.

From-SVN: r194185

11 years agore PR lto/55525 (ICE: tree check: expected array_type, have pointer_type in array_ref...
Richard Biener [Wed, 5 Dec 2012 08:47:40 +0000 (08:47 +0000)]
re PR lto/55525 (ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768)

2012-12-05  Richard Biener  <rguenther@suse.de>

PR lto/55525
* gimple-streamer-in.c (input_gimple_stmt): Fixup ARRAY_REFs as well.

* gcc.dg/lto/pr55525_0.c: New testcase.
* gcc.dg/lto/pr55525_1.c: Likewise.

From-SVN: r194183