- 07 Jan, 2013 7 commits
-
-
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust comment about type extension with discriminants. <E_Record_Subtype>: Remove useless test and reorder conditions. (elaborate_entity) <E_Record_Subtype>: Likewise. From-SVN: r194965
Eric Botcazou committed -
2013-01-04 Richard Biener <rguenther@suse.de> PR ada/864 * gcc-interface/Make-lang.in (ada.install-common): Always apply program_transform_name. From-SVN: r194964
Richard Biener committed -
2012-01-07 Tobias Burnus <burnus@net-b.de> PR fortran/55763 * resolve.c (resolve_select_type): Reject intrinsic types for a non-unlimited-polymorphic selector. 2012-01-07 Tobias Burnus <burnus@net-b.de> PR fortran/55763 * gfortran.dg/select_type_32.f90: New. From-SVN: r194962
Tobias Burnus committed -
Consider this test case: 1 template <const char *const C, typename T> 2 struct A 3 {}; 4 5 struct B {}; 6 7 extern constexpr char HELLO_WORLD[] = "hello world"; 8 9 A<HELLO_WORLD, B> g; // <-- This works fine 10 11 template <typename T> 12 using PartiallySpecialized = A<HELLO_WORLD, T>; // <-- This fails 13 At line 12 G++ fails to instantiate the alias template that has a string variable initialized with a string literal, with the error message: test.cc:12:46: error: ‘"hello world"’ is not a valid template argument of type ‘const char*’ because ‘"hello world"’ is not a variable using PartiallySpecialized = A<HELLO_WORLD, T>; // <-- This fails ^ Note that instantiating the template A at line 9 with the same arguments as in the problematic case above works. This happens in the context of lookup_template_class_1, when it handles the alias template instantiation A<HELLO_WORLD, T> and thus passes the VAR_DECL for HELLO_WORLD to convert_nontype_argument. Note that from there decay_conversion replaces the the VAR_DECL with its STRING_CST initializer[1]. Latter on, convert_nontype_argument checks that the HELLO_WORLD constant it received as argument was indeed a VAR_DECL: else { tree decl; decl = ((TREE_CODE (expr) == ADDR_EXPR) ? TREE_OPERAND (expr, 0) : expr); if (TREE_CODE (decl) != VAR_DECL) { error ("%qE is not a valid template argument of type %qT " "because %qE is not a variable", expr, type, decl); return NULL_TREE; } But the issue is, that VAR_DECL has been replaced by STRING_CST, so the last 'if' above fails. The fix is to teach decay_conversion to return the address of array, rather than returning its initializer. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. gcc/cp/ PR c++/55311 * pt.c (decay_conversion): Do not return the initializer of an array. gcc/testsuite/ PR c++/55311 * g++.dg/cpp0x/alias-decl-30.C: New test. * g++.dg/init/array21.C: New test. From-SVN: r194961
Dodji Seketeli committed -
In the example accompanying this patch, check_instantiated_arg tries to ensure that a non-type template argument should be a constant if it has integral or enumeration type. The problem is that an alias template which type-id is, e.g, an integer, looks like an argument that has integral/enumeration type: its TREE_TYPE is an integer type. So check_instantiated_arg mistenkaly barks that this integral non-type argument is not a constant. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. gcc/cp/ PR c++/52343 * pt.c (check_instantiated_arg): Allow type template arguments. gcc/testsuite/ PR c++/52343 * g++.dg/cpp0x/alias-decl-29.C: New test. From-SVN: r194960
Dodji Seketeli committed -
PR libstdc++/55847 * src/c++11/shared_ptr.cc (bad_weak_ptr::what()): Correct string. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Verify string. PR libstdc++/55728 * include/std/functional (bad_function_call::what()): Declare. * src/c++11/functional.cc (bad_function_call::what()): Define. * config/abi/pre/gnu.ver (bad_function_call::what()): Export. * testsuite/20_util/bad_function_call/what.cc: New. From-SVN: r194958
Jonathan Wakely committed -
From-SVN: r194957
GCC Administrator committed
-
- 06 Jan, 2013 14 commits
-
-
* include/bits/unordered_map.h: Fix typo in comments. * doc/xml/manual/status_cxx2011.xml: Add implementation-defined bucket counts for unordered associative containers. From-SVN: r194954
Jonathan Wakely committed -
2013-01-06 Paul Thomas <pault@gcc.gnu.org> PR fortran/PR53876 PR fortran/PR54990 PR fortran/PR54992 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL to see if it is GFC_CLASS_TYPE_P. * trans-expr.c (gfc_get_vptr_from_expr): The same. (gfc_conv_class_to_class): If the types are not the same, cast parmese->expr to the type of ctree. * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of CLASS components must be set. 2013-01-06 Paul Thomas <pault@gcc.gnu.org> PR fortran/PR53876 PR fortran/PR54990 PR fortran/PR54992 * gfortran.dg/class_array_15.f03: New test. From-SVN: r194953
Paul Thomas committed -
gcc/ * file-find.c, file-find.h, realmpfr.c: Add FSF as copyright holder. From-SVN: r194952
Richard Sandiford committed -
From-SVN: r194950
Jonathan Wakely committed -
PR fortran/42769 PR fortran/45836 PR fortran/45900 * module.c (read_module): Don't reuse local symtree if the associated symbol isn't exactly the one wanted. Don't reuse local symtree if it is ambiguous. * resolve.c (resolve_call): Use symtree's name instead of symbol's to lookup the symtree. PR fortran/42769 PR fortran/45836 PR fortran/45900 * gfortran.dg/use_23.f90: New test. * gfortran.dg/use_24.f90: New test. * gfortran.dg/use_25.f90: New test. * gfortran.dg/use_26.f90: New test. * gfortran.dg/use_27.f90: New test. From-SVN: r194949
Mikael Morin committed -
re PR fortran/54678 (second call to get_environment_variable gives valgrind warning with 8-byte integers) 2013-01-06 Tobias Burnus <burnus@net-b.de> PR fortran/54678 * intrinsics/env.c (get_environment_variable_i8): Don't use uninitialized variable. From-SVN: r194948
Tobias Burnus committed -
From-SVN: r194947
Eric Botcazou committed -
decl.c (gnat_to_gnu_field): Emit a specialized diagnostic for component size mismatch wrt volatile requirements. * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized diagnostic for component size mismatch wrt volatile requirements. Add a gcc_unreachable() at the end of the checks for size. Split the check on volatile for positions into one check on atomic and a subsequent one on volatile. From-SVN: r194946
Olivier Hainque committed -
From-SVN: r194945
Eric Botcazou committed -
* gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not pack the field of the record type made for a misaligned type. From-SVN: r194942
Eric Botcazou committed -
libstdc++-v3/ * include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp: Fix typo in copyright years. * testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc: Likewise. From-SVN: r194941
Richard Sandiford committed -
gcc/ * config/tilepro/gen-mul-tables.cc: Put copyright on one line. From-SVN: r194940
Richard Sandiford committed -
* gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared for discriminants inherited from parent record types. From-SVN: r194939
Eric Botcazou committed -
From-SVN: r194936
GCC Administrator committed
-
- 05 Jan, 2013 5 commits
-
-
* config/rs6000/aix53.h (LIB_SPEC): Add -lpthreads when compiling to generate profiling. * config/rs6000/aix64.h (LIB_SPEC): Same. From-SVN: r194930
David Edelsohn committed -
From-SVN: r194929
Mikael Morin committed -
re PR fortran/55827 (ICE with multiple fortran modules and character lenght determined by an interfaced pure function) 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org> Mikael Morin <mikael@gcc.gnu.org> PR fortran/55827 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case e->symtree == NULL. * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it. 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org> Mikael Morin <mikael@gcc.gnu.org> PR fortran/55827 * gfortran.dg/use_22.f90: New test. Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org> From-SVN: r194928
Steven G. Kargl committed -
2013-01-05 Tobias Burnus <burnus@net-b.de> * class.c (finalize_component): Used passed offset expr. (finalization_get_offset): New static function. (finalizer_insert_packed_call, generate_finalization_wrapper): Use it to handle noncontiguous arrays. From-SVN: r194927
Tobias Burnus committed -
From-SVN: r194924
GCC Administrator committed
-
- 04 Jan, 2013 14 commits
-
-
2013-01-04 Andrew Pinski <apinski@cavium.com> * config/aarch64/aarch64.c (aarch64_fixed_condition_code_regs): New function. (TARGET_FIXED_CONDITION_CODE_REGS): Define. 2013-01-04 Andrew Pinski <apinski@cavium.com> * gcc.target/aarch64/cmp-1.c: New testcase. From-SVN: r194920
Andrew Pinski committed -
2013-01-04 Tobias Burnus <burnus@net-b.de> * trans.c (gfc_build_final_call): New function. * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor): New function prototypes. * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from conv_scalar_to_descriptor, removed static attribute. (gfc_conv_procedure_call): Honor renaming. From-SVN: r194919
Tobias Burnus committed -
2013-01-04 Tobias Burnus <burnus@net-b.de> * intrinsic.c (add_functions): New internal intrinsic function GFC_PREFIX ("stride"). * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE. * intrinsic.h (gfc_resolve_stride): New prototypes. * iresolve.c (gfc_resolve_stride): New function. * trans-intrinsic.c (conv_intrinsic_stride): New static function. (gfc_conv_intrinsic_function): Use it. From-SVN: r194918
Tobias Burnus committed -
2013-01-04 Tobias Burnus <burnus@net-b.de> * class.c (gfc_find_intrinsic_vtab): Add _final component. From-SVN: r194917
Tobias Burnus committed -
2013-01-04 Paul Thomas <pault@gcc.gnu.org> PR fortran/55172 * match.c (copy_ts_from_selector_to_associate): Remove call to gfc_resolve_expr and replace it with explicit setting of the array reference type. * resolve.c (resolve_select_type): It is an error if the selector is coindexed. 2013-01-04 Paul Thomas <pault@gcc.gnu.org> PR fortran/55172 * gfortran.dg/select_type_31.f03: New test. From-SVN: r194916
Paul Thomas committed -
PR other/54800 * simple-object-mach-o.c (simple_object_mach_o_segment): Don't bother to zero out a buffer we are about to set anyhow. From-SVN: r194914
Ian Lance Taylor committed -
* config/i386/i386.c (ix86_legitimize_address): Call convert_to_mode unconditionally. (ix86_expand_move): Ditto. (ix86_zero_extend_to_Pmode): Ditto. (ix86_expand_call): Ditto. (ix86_expand_special_args_builtin): Ditto. (ix86_expand_builtin): Ditto. From-SVN: r194913
Uros Bizjak committed -
PR c++/55877 * decl.c (reset_type_linkage, bt_reset_linkage): New. (grokdeclarator): Use reset_type_linkage. * name-lookup.c (binding_table_foreach): Handle null table. * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME. From-SVN: r194910
Jason Merrill committed -
/libcpp 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54526 (again) * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2. /gcc/cp 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54526 (again) * parser.c (cp_parser_template_id): Revert core of previous change (keep adjusted inform message). /gcc/testsuite 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54526 (again) * g++.dg/cpp0x/parse2.C: Extend. * g++.old-deja/g++.other/crash28.C: Adjust. From-SVN: r194909
Paolo Carlini committed -
2013-01-04 Richard Biener <rguenther@suse.de> PR tree-optimization/55862 * tree-ssa-pre.c (phi_translate_1): Valueize SSA names after translating them through PHI nodes. * gcc.dg/torture/pr55862.c: New testcase. From-SVN: r194906
Richard Biener committed -
2013-01-04 Martin Jambor <mjambor@suse.cz> PR tree-optimization/55755 * tree-sra.c (sra_modify_assign): Do not check that an access has no children when trying to avoid producing a VIEW_CONVERT_EXPR. testsuite/ * gcc.dg/torture/pr55755.c: New test. * gcc.dg/tree-ssa/sra-13.c: Likewise. * gcc.dg/tree-ssa/pr45144.c: Update. From-SVN: r194905
Martin Jambor committed -
From-SVN: r194903
Jakub Jelinek committed -
re PR middle-end/55859 (Mention -Og/-Ofast in "error: argument to '-O' should be a non-negative integer") PR55859. From-SVN: r194901
Marek Polacek committed -
2013-01-04 Richard Biener <rguenther@suse.de> PR middle-end/55863 * fold-const.c (split_tree): Undo -X - 1 to ~X folding for reassociation. * gcc.dg/fold-reassoc-2.c: New testcase. From-SVN: r194899
Richard Biener committed
-