1. 07 Jan, 2013 7 commits
    • decl.c (gnat_to_gnu_entity): Adjust comment about type extension with discriminants. · a8c4c75a
      	* 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
    • re PR ada/864 (--program-suffix is ignored (for ada)) · 5b638c3a
      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
    • re PR fortran/55763 (Issues with some simpler CLASS(*) programs) · 55d8631b
      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
    • PR c++/55311 - Cannot specialize alias template with arg of type array of char · 9bdae013
      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
    • PR c++/52343 - error with alias template as template template argument · 36b21740
      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
    • re PR libstdc++/55847 (mistake bad_weak_ptr::what() message) · 78aff336
      	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
    • Daily bump. · 26ba9c91
      From-SVN: r194957
      GCC Administrator committed
  2. 06 Jan, 2013 14 commits
  3. 05 Jan, 2013 5 commits
  4. 04 Jan, 2013 14 commits