aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@linaro.org>2013-02-26 10:33:35 +0000
committerMatthew Gretton-Dann <matthew.gretton-dann@linaro.org>2013-02-26 10:33:35 +0000
commit2da091fce72d715269b1b225a52cdd6af0d7ac23 (patch)
treee9606200a2e0b3694b73bbe30bdac5a5d19b6137
parentcd167851d8e4a9cc8afc28b4708b5e8d3a05161a (diff)
Merge from FSF GCC 4.7.3 (svn branches/gcc-4_7-branch 196272).
-rw-r--r--ChangeLog.linaro4
-rw-r--r--gcc/ChangeLog157
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog40
-rw-r--r--gcc/ada/adaint.c14
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in2
-rw-r--r--gcc/ada/gnat-style.texi2
-rw-r--r--gcc/ada/init.c52
-rw-r--r--gcc/ada/initialize.c6
-rw-r--r--gcc/ada/projects.texi12
-rw-r--r--gcc/ada/seh_init.c2
-rw-r--r--gcc/ada/tracebak.c2
-rw-r--r--gcc/collect2.c10
-rw-r--r--gcc/config/i386/gnu-user.h6
-rw-r--r--gcc/config/i386/gnu-user64.h6
-rw-r--r--gcc/config/i386/i386.c3
-rw-r--r--gcc/config/i386/sse.md58
-rw-r--r--gcc/config/rs6000/rs6000.c18
-rwxr-xr-xgcc/configure6
-rw-r--r--gcc/configure.ac6
-rw-r--r--gcc/cp/ChangeLog77
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/init.c64
-rw-r--r--gcc/cp/parser.c12
-rw-r--r--gcc/cp/pt.c19
-rw-r--r--gcc/cp/semantics.c72
-rw-r--r--gcc/cp/tree.c43
-rw-r--r--gcc/doc/invoke.texi2
-rw-r--r--gcc/dwarf2out.c11
-rw-r--r--gcc/expmed.c3
-rw-r--r--gcc/fold-const.c5
-rw-r--r--gcc/fortran/ChangeLog28
-rw-r--r--gcc/fortran/decl.c34
-rw-r--r--gcc/fortran/simplify.c6
-rw-r--r--gcc/fortran/symbol.c22
-rw-r--r--gcc/fortran/trans-array.c7
-rw-r--r--gcc/ggc-page.c20
-rw-r--r--gcc/lto/ChangeLog142
-rw-r--r--gcc/lto/lto.c4
-rw-r--r--gcc/omp-low.c15
-rw-r--r--gcc/simplify-rtx.c3
-rw-r--r--gcc/testsuite/ChangeLog119
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle61.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C37
-rw-r--r--gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C19
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr56217.C14
-rw-r--r--gcc/testsuite/g++.dg/parse/crash61.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/pr56239.C13
-rw-r--r--gcc/testsuite/g++.dg/template/error49.C10
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem23.C22
-rw-r--r--gcc/testsuite/g++.dg/template/typename19.C24
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr53844.C78
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56250.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr55110.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr56275.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr56350.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55107.c34
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-5.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/clearcapv2.map7
-rw-r--r--gcc/testsuite/gcc.target/i386/i386.exp17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c2
-rw-r--r--gcc/testsuite/gfortran.dg/import10.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/import11.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/import2.f906
-rw-r--r--gcc/testsuite/gfortran.dg/import8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_derived_type_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_size_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/matmul_9.f9047
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_37.f9025
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/pr54767.f9031
-rw-r--r--gcc/tree-ssa-dse.c12
-rw-r--r--gcc/tree-ssa-pre.c67
-rw-r--r--gcc/tree-vect-loop.c20
-rw-r--r--gcc/tree-vrp.c20
-rw-r--r--gcc/var-tracking.c45
-rw-r--r--libada/ChangeLog6
-rw-r--r--libada/Makefile.in14
-rw-r--r--libcpp/po/ChangeLog4
-rw-r--r--libcpp/po/eo.po955
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/io/open.c11
-rw-r--r--libgfortran/io/unix.c19
-rw-r--r--libgomp/ChangeLog18
-rw-r--r--libgomp/task.c31
-rw-r--r--libgomp/testsuite/libgomp.c++/pr56217.C36
-rw-r--r--libiberty/ChangeLog9
-rw-r--r--libiberty/regex.c8
-rw-r--r--libjava/classpath/ChangeLog.gcj6
-rw-r--r--libjava/classpath/doc/cp-tools.texinfo2
-rw-r--r--libstdc++-v3/ChangeLog38
-rw-r--r--libstdc++-v3/include/bits/alloc_traits.h61
-rw-r--r--libstdc++-v3/include/bits/hashtable.h56
-rw-r--r--libstdc++-v3/include/bits/hashtable_policy.h3
-rw-r--r--libstdc++-v3/include/bits/unordered_map.h8
-rw-r--r--libstdc++-v3/include/bits/unordered_set.h8
-rw-r--r--libstdc++-v3/include/debug/unordered_map14
-rw-r--r--libstdc++-v3/include/debug/unordered_set14
-rw-r--r--libstdc++-v3/include/std/functional12
-rw-r--r--libstdc++-v3/include/std/streambuf17
-rw-r--r--libstdc++-v3/include/std/unordered_map3
-rw-r--r--libstdc++-v3/include/std/unordered_set3
-rw-r--r--libstdc++-v3/testsuite/20_util/function_objects/mem_fn/adl.cc44
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc69
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53339.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc69
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/55043.cc73
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/55043.cc73
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc4
115 files changed, 3131 insertions, 533 deletions
diff --git a/ChangeLog.linaro b/ChangeLog.linaro
index a97db8eb052..baeb600bfa4 100644
--- a/ChangeLog.linaro
+++ b/ChangeLog.linaro
@@ -1,3 +1,7 @@
+2013-02-26 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
+
+ Merge from FSF GCC 4.7.3 (svn branches/gcc-4_7-branch 196272).
+
2013-02-18 Yvan Roux <yvan.roux@linaro.org>
gcc/
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 12850c1f57c..724f4aed3da 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,158 @@
+2013-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/56258
+ * doc/invoke.texi (-fdump-rtl-pro_and_epilogue): Use @item
+ instead of @itemx.
+
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56350
+ * tree-vect-loop.c (vectorizable_reduction): If orig_stmt, return false
+ if haven't found reduction or nested cycle operand, rather than
+ asserting we must find it.
+
+ PR tree-optimization/56381
+ * tree-ssa-pre.c (create_expression_by_pieces): Fix up last argument
+ to fold_build3.
+
+ 2013-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56250
+ * fold-const.c (extract_muldiv_1) <case NEGATE_EXPR>: Don't optimize
+ if type is unsigned and code isn't MULT_EXPR.
+
+ 2013-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56217
+ * omp-low.c (use_pointer_for_field): Return false if
+ lower_send_shared_vars doesn't generate any copy-out code.
+
+ 2012-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55110
+ * tree-vect-loop.c (vectorizable_reduction): Don't assert
+ that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
+
+2013-02-18 Richard Biener <rguenther@suse.de>
+
+ Revert
+ 2013-02-04 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53844
+ * tree-ssa-dse.c (dse_possible_dead_store_p): Properly handle
+ the loop virtual PHI.
+
+2013-02-13 David S. Miller <davem@davemloft.net>
+
+ * expmed.c (expand_shift_1): Only strip scalar integer subregs.
+
+2013-02-11 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2013-02-11 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/56275
+ * simplify-rtx.c (avoid_constant_pool_reference): Check that
+ offset is non-negative and less than cmode size before
+ calling simplify_subreg.
+
+2013-02-09 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2013-02-08 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sse.md (FMAMODEM): New mode iterator.
+ (fma<mode>4, fms<mode>4, fnma<mode>4, fnms<mode>4): Use FMAMODEM
+ mode iterator. Do not use TARGET_SSE_MATH in insn constraint.
+
+ 2013-02-08 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/gnu-user.h (TARGET_CAN_SPLIT_STACK): Define only
+ when HAVE_GAS_CFI_PERSONALITY_DIRECTIVE is set.
+ * config/i386/gnu-user64.h (TARGET_CAN_SPLIT_STACK): Ditto.
+
+2013-02-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2013-02-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/56043
+ * config/rs6000/rs6000.c (rs6000_builtin_vectorized_libmass):
+ If there is no implicit builtin declaration, just return NULL.
+
+2013-02-08 David Edelsohn <dje.gcc@gmail.com>
+ Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Backport from mainline
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): Clear
+ MASK_VSX from set_masks if OS_MISSING_ALTIVEC.
+
+2013-02-07 David S. Miller <davem@davemloft.net>
+
+ * dwarf2out.c (based_loc_descr): Perform leaf register remapping
+ on 'reg'.
+ * var-tracking.c (vt_add_function_parameter): Test the presence of
+ HAVE_window_save properly and do not remap argument registers when
+ we have a leaf function.
+
+2013-02-07 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2013-02-07 Uros Bizjak <ubizjak@gmail.com>
+
+ PR bootstrap/56227
+ * ggc-page.c (ggc_print_statistics): Use HOST_LONG_LONG_FORMAT
+ instead of "ll".
+ * config/i386/i386.c (ix86_print_operand): Ditto.
+
+2013-02-07 Alan Modra <amodra@gmail.com>
+
+ PR target/53040
+ * config/rs6000/rs6000.c (rs6000_savres_strategy): When using
+ static chain, set REST_INLINE_FPRS too.
+
+2013-02-06 David Edelsohn <dje.gcc@gmail.com>
+
+ Backport from mainline
+ 2013-01-25 Michael Haubenwallner <michael.haubenwallner@salomon.at>
+
+ * configure.ac (gcc_cv_ld_static_dynamic): Define for AIX native ld.
+ * configure: Regenerate.
+
+2013-02-05 David Edelsohn <dje.gcc@gmail.com>
+
+ Backport from mainline
+ 2013-02-03 David Edelsohn <dje.gcc@gmail.com>
+ Andrew Dixie <andrewd@gentrack.com>
+
+ * collect2.c (GCC_CHECK_HDR): Do not scan objects with F_LOADONLY
+ flag set.
+
+2013-02-05 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-12-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55107
+ * tree-ssa-pre.c (struct pre_stats): Remove constified field.
+ (bitmap_set_replace_value): Add gcc_unreachable.
+ (do_regular_insertion): Re-write all_same handling. Insert
+ an assignment instead of a PHI in this case.
+ (execute_pre): Do not record constified events.
+
+2013-02-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54767
+ * tree-vrp.c (vrp_visit_phi_node): For PHI arguments coming via
+ backedges drop all symbolical range information.
+ (execute_vrp): Compute backedges.
+
2013-02-04 Richard Biener <rguenther@suse.de>
Backport from mainline
@@ -8,7 +163,7 @@
value-range for __builtin_constant_p of function parameters.
2013-01-08 Jakub Jelinek <jakub@redhat.com>
-
+
PR middle-end/55890
* tree-ssa-ccp.c (evaluate_stmt): Use gimple_call_builtin_class_p.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index e81bb7b2625..f5af81fe987 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20130205
+20130226
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 245a0d28623..b9be951cc49 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,43 @@
+2013-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/56258
+ * gnat-style.texi (@title): Remove @hfill.
+ * projects.texi: Avoid line wrapping inside of @pxref or
+ @xref.
+
+2013-02-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/56271
+ Backport from mainline
+ 2012-05-15 Olivier Hainque <hainque@adacore.com>
+
+ * gcc-interface/Make-lang.in (COMMON_FLAGS_TO_PASS): Use WARN_CFLAGS
+ instead of trying to mimic it.
+
+2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
+
+ Back-port from mainline.
+ PR target/52123
+ * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
+ SECURITY_DESCRIPTOR *.
+ (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE.
+ (__gnat_portable_spawn): Fix cast to char* const*.
+ (add_handle): Cast from pointer via void **.
+ (add_handle): Cast from pointer via int *.
+ (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *.
+ (__gnat_locate_exec_on_path): Cast from pointer via char *.
+ * initialize.c (append_arg): Cast from pointer via LPWSTR.
+ (__gnat_initialize): Cast from pointer via LPWSTR.
+ * seh_init.c (__gnat_SEH_error_handler): Cast from pointer via FARPROC.
+ * tracebak.c: Cast from pointer via FARPROC.
+
+2013-02-07 Simon Wright <simon@pushface.org>
+
+ PR target/50678
+ * init.c (__darwin_major_version): New function for x86-64/Darwin.
+ (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
+ on Darwin 12 and above.
+
2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 4c96d56b1ce..83916a42f2a 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -1982,7 +1982,7 @@ __gnat_check_OWNER_ACL
GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
NULL, 0, &nLength);
- if ((pSD = (PSECURITY_DESCRIPTOR) HeapAlloc
+ if ((pSD = (SECURITY_DESCRIPTOR *) HeapAlloc
(GetProcessHeap (), HEAP_ZERO_MEMORY, nLength)) == NULL)
return 0;
@@ -2059,7 +2059,7 @@ __gnat_set_OWNER_ACL
return;
BuildExplicitAccessWithName
- (&ea, username, AccessPermissions, AccessMode, NO_INHERITANCE);
+ (&ea, username, AccessPermissions, (ACCESS_MODE) AccessMode, NO_INHERITANCE);
if (AccessMode == SET_ACCESS)
{
@@ -2384,7 +2384,7 @@ __gnat_portable_spawn (char *args[])
strcat (args[0], args_0);
strcat (args[0], "\"");
- status = spawnvp (P_WAIT, args_0, (const char* const*)args);
+ status = spawnvp (P_WAIT, args_0, (char* const*)args);
/* restore previous value */
free (args[0]);
@@ -2544,9 +2544,9 @@ add_handle (HANDLE h, int pid)
{
plist_max_length += 1000;
HANDLES_LIST =
- xrealloc (HANDLES_LIST, sizeof (HANDLE) * plist_max_length);
+ (void **) xrealloc (HANDLES_LIST, sizeof (HANDLE) * plist_max_length);
PID_LIST =
- xrealloc (PID_LIST, sizeof (int) * plist_max_length);
+ (int *) xrealloc (PID_LIST, sizeof (int) * plist_max_length);
}
HANDLES_LIST[plist_length] = h;
@@ -2935,7 +2935,7 @@ __gnat_locate_exec_on_path (char *exec_name)
#define EXPAND_BUFFER_SIZE 32767
- wapath_val = alloca (EXPAND_BUFFER_SIZE);
+ wapath_val = (TCHAR *) alloca (EXPAND_BUFFER_SIZE);
wapath_val [0] = '.';
wapath_val [1] = ';';
@@ -2945,7 +2945,7 @@ __gnat_locate_exec_on_path (char *exec_name)
if (!res) wapath_val [0] = _T('\0');
- apath_val = alloca (EXPAND_BUFFER_SIZE);
+ apath_val = (char *) alloca (EXPAND_BUFFER_SIZE);
WS2SC (apath_val, wapath_val, EXPAND_BUFFER_SIZE);
return __gnat_locate_exec (exec_name, apath_val);
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 289f0b7f8b9..ec95398ecbe 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -68,7 +68,7 @@ ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
THREAD_KIND=native
TRACE=no
# We do not want the WARN_CFLAGS of the compiler in Ada as it is for C/C++.
-COMMON_FLAGS_TO_PASS = $(filter-out -pedantic -W%, $(FLAGS_TO_PASS))
+COMMON_FLAGS_TO_PASS = $(filter-out $(WARN_CFLAGS), $(FLAGS_TO_PASS))
ADA_FLAGS_TO_PASS = \
"ADA_FOR_BUILD=$(ADA_FOR_BUILD)" \
"ADA_INCLUDE_DIR=$(ADA_INCLUDE_DIR)" \
diff --git a/gcc/ada/gnat-style.texi b/gcc/ada/gnat-style.texi
index 1bba7030935..5b519fb9a22 100644
--- a/gcc/ada/gnat-style.texi
+++ b/gcc/ada/gnat-style.texi
@@ -42,7 +42,7 @@ Texts. A copy of the license is included in the section entitled
@titlepage
@titlefont{GNAT Coding Style:}
@sp 1
-@title @hfill A Guide for GNAT Developers
+@title A Guide for GNAT Developers
@subtitle GNAT, The GNU Ada Compiler
@versionsubtitle
@author Ada Core Technologies, Inc.
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 18280c28ca9..d8f5735a02c 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -2256,7 +2256,9 @@ __gnat_install_handler(void)
#elif defined(__APPLE__)
#include <signal.h>
+#include <stdlib.h>
#include <sys/syscall.h>
+#include <sys/sysctl.h>
#include <mach/mach_vm.h>
#include <mach/mach_init.h>
#include <mach/vm_statistics.h>
@@ -2295,20 +2297,52 @@ __gnat_is_stack_guard (mach_vm_address_t addr)
#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
+#if defined (__x86_64__)
+static int
+__darwin_major_version (void)
+{
+ static int cache = -1;
+ if (cache < 0)
+ {
+ int mib[2] = {CTL_KERN, KERN_OSRELEASE};
+ size_t len;
+
+ /* Find out how big the buffer needs to be (and set cache to 0
+ on failure). */
+ if (sysctl (mib, 2, NULL, &len, NULL, 0) == 0)
+ {
+ char release[len];
+ sysctl (mib, 2, release, &len, NULL, 0);
+ /* Darwin releases are of the form L.M.N where L is the major
+ version, so strtol will return L. */
+ cache = (int) strtol (release, NULL, 10);
+ }
+ else
+ {
+ cache = 0;
+ }
+ }
+ return cache;
+}
+#endif
+
void
__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED,
void *ucontext ATTRIBUTE_UNUSED)
{
#if defined (__x86_64__)
- /* Work around radar #10302855/pr50678, where the unwinders (libunwind or
- libgcc_s depending on the system revision) and the DWARF unwind data for
- the sigtramp have different ideas about register numbering (causing rbx
- and rdx to be transposed).. */
- ucontext_t *uc = (ucontext_t *)ucontext ;
- unsigned long t = uc->uc_mcontext->__ss.__rbx;
-
- uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx;
- uc->uc_mcontext->__ss.__rdx = t;
+ if (__darwin_major_version () < 12)
+ {
+ /* Work around radar #10302855, where the unwinders (libunwind or
+ libgcc_s depending on the system revision) and the DWARF unwind
+ data for sigtramp have different ideas about register numbering,
+ causing rbx and rdx to be transposed. */
+ ucontext_t *uc = (ucontext_t *)ucontext;
+ unsigned long t = uc->uc_mcontext->__ss.__rbx;
+
+ uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx;
+ uc->uc_mcontext->__ss.__rdx = t;
+ }
#endif
}
diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c
index 90f35a0a9b4..783f8af5b86 100644
--- a/gcc/ada/initialize.c
+++ b/gcc/ada/initialize.c
@@ -88,14 +88,14 @@ append_arg (int *index, LPWSTR dir, LPWSTR value,
{
/* no dir prefix */
dirlen = 0;
- fullvalue = xmalloc ((vallen + 1) * sizeof(TCHAR));
+ fullvalue = (LPWSTR) xmalloc ((vallen + 1) * sizeof(TCHAR));
}
else
{
/* Add dir first */
dirlen = _tcslen (dir);
- fullvalue = xmalloc ((dirlen + vallen + 1) * sizeof(TCHAR));
+ fullvalue = (LPWSTR) xmalloc ((dirlen + vallen + 1) * sizeof(TCHAR));
_tcscpy (fullvalue, dir);
}
@@ -203,7 +203,7 @@ __gnat_initialize (void *eh ATTRIBUTE_UNUSED)
if (ldir != NULL)
{
int n = ldir - wargv[k] + 1;
- dir = xmalloc ((n + 1) * sizeof (TCHAR));
+ dir = (LPWSTR) xmalloc ((n + 1) * sizeof (TCHAR));
_tcsncpy (dir, wargv[k], n);
dir[n] = _T('\0');
}
diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi
index fd0de1bb8f2..dc5ed7b5b2a 100644
--- a/gcc/ada/projects.texi
+++ b/gcc/ada/projects.texi
@@ -48,8 +48,7 @@ project files allow you to specify:
@item Source file naming conventions; you can specify these either globally or for
individual compilation units (@pxref{Naming Schemes}).
@item Change any of the above settings depending on external values, thus enabling
- the reuse of the projects in various @b{scenarios} (@pxref{Scenarios
- in Projects}).
+ the reuse of the projects in various @b{scenarios} (@pxref{Scenarios in Projects}).
@item Automatically build libraries as part of the build process
(@pxref{Library Projects}).
@@ -353,8 +352,8 @@ locating the specified source files in the specified source directories.
@item For various reasons, it is sometimes useful to have a project with no
sources (most of the time because the attributes defined in the project
- file will be reused in other projects, as explained in @pxref{Organizing
- Projects into Subsystems}. To do this, the attribute
+ file will be reused in other projects, as explained in
+ @pxref{Organizing Projects into Subsystems}. To do this, the attribute
@emph{Source_Files} is set to the empty list, i.e. @code{()}. Alternatively,
@emph{Source_Dirs} can be set to the empty list, with the same
result.
@@ -381,8 +380,9 @@ locating the specified source files in the specified source directories.
This can be done thanks to the attribute @b{Excluded_Source_Files}
(or its synonym @b{Locally_Removed_Files}).
Its value is the list of file names that should not be taken into account.
- This attribute is often used when extending a project, @xref{Project
- Extension}. A similar attribute @b{Excluded_Source_List_File} plays the same
+ This attribute is often used when extending a project,
+ @xref{Project Extension}. A similar attribute
+ @b{Excluded_Source_List_File} plays the same
role but takes the name of file containing file names similarly to
@code{Source_List_File}.
diff --git a/gcc/ada/seh_init.c b/gcc/ada/seh_init.c
index 89c9ea48e09..a7f3879577a 100644
--- a/gcc/ada/seh_init.c
+++ b/gcc/ada/seh_init.c
@@ -90,7 +90,7 @@ __gnat_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
*/
if ((ExceptionRecord->ExceptionInformation[1] & 3) != 0
|| IsBadCodePtr
- ((void *)(ExceptionRecord->ExceptionInformation[1] + 4096)))
+ ((FARPROC)(ExceptionRecord->ExceptionInformation[1] + 4096)))
{
exception = &program_error;
msg = "EXCEPTION_ACCESS_VIOLATION";
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index ff2a3b6cfdb..08c5b3bdc7c 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -326,7 +326,7 @@ struct layout
#if defined (__WIN32)
#include <windows.h>
-#define IS_BAD_PTR(ptr) (IsBadCodePtr((void *)ptr))
+#define IS_BAD_PTR(ptr) (IsBadCodePtr((FARPROC)ptr))
#elif defined (sun)
#define IS_BAD_PTR(ptr) ((unsigned long)ptr == -1UL)
#else
diff --git a/gcc/collect2.c b/gcc/collect2.c
index a44b2e7bc84..748a3f479ad 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -2932,12 +2932,14 @@ scan_libraries (const char *prog_name)
/* 0757 = U803XTOCMAGIC (AIX 4.3) and 0767 = U64_TOCMAGIC (AIX V5) */
#if TARGET_AIX_VERSION >= 51
# define GCC_CHECK_HDR(X) \
- ((HEADER (X).f_magic == U802TOCMAGIC && ! aix64_flag) \
- || (HEADER (X).f_magic == 0767 && aix64_flag))
+ (((HEADER (X).f_magic == U802TOCMAGIC && ! aix64_flag) \
+ || (HEADER (X).f_magic == 0767 && aix64_flag)) \
+ && !(HEADER (X).f_flags & F_LOADONLY))
#else
# define GCC_CHECK_HDR(X) \
- ((HEADER (X).f_magic == U802TOCMAGIC && ! aix64_flag) \
- || (HEADER (X).f_magic == 0757 && aix64_flag))
+ (((HEADER (X).f_magic == U802TOCMAGIC && ! aix64_flag) \
+ || (HEADER (X).f_magic == 0757 && aix64_flag)) \
+ && !(HEADER (X).f_flags & F_LOADONLY))
#endif
#endif
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index 98d0a25cbe3..91318a4783a 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -198,7 +198,11 @@ along with GCC; see the file COPYING3. If not see
/* i386 glibc provides __stack_chk_guard in %gs:0x14. */
#define TARGET_THREAD_SSP_OFFSET 0x14
-/* We steal the last transactional memory word. */
+/* We only build the -fsplit-stack support in libgcc if the
+ assembler has full support for the CFI directives. */
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
#define TARGET_CAN_SPLIT_STACK
+#endif
+/* We steal the last transactional memory word. */
#define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
#endif
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
index 954f3b2ff24..fd96df41e0e 100644
--- a/gcc/config/i386/gnu-user64.h
+++ b/gcc/config/i386/gnu-user64.h
@@ -121,8 +121,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define TARGET_THREAD_SSP_OFFSET \
(TARGET_64BIT ? (TARGET_X32 ? 0x18 : 0x28) : 0x14)
-/* We steal the last transactional memory word. */
+/* We only build the -fsplit-stack support in libgcc if the
+ assembler has full support for the CFI directives. */
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
#define TARGET_CAN_SPLIT_STACK
+#endif
+/* We steal the last transactional memory word. */
#define TARGET_THREAD_SPLIT_STACK_OFFSET \
(TARGET_64BIT ? (TARGET_X32 ? 0x40 : 0x70) : 0x30)
#endif
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7921707faf0..c1f6c880c81 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -14508,7 +14508,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
putc ('$', file);
/* Sign extend 32bit SFmode immediate to 8 bytes. */
if (code == 'q')
- fprintf (file, "0x%08llx", (unsigned long long) (int) l);
+ fprintf (file, "0x%08" HOST_LONG_LONG_FORMAT "x",
+ (unsigned long long) (int) l);
else
fprintf (file, "0x%08x", (unsigned int) l);
}
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index bf4b136b9c8..8fc267807a3 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1719,42 +1719,46 @@
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define_mode_iterator FMAMODE [SF DF V4SF V2DF V8SF V4DF])
+;; The standard names for scalar FMA are only available with SSE math enabled.
+(define_mode_iterator FMAMODEM [(SF "TARGET_SSE_MATH")
+ (DF "TARGET_SSE_MATH")
+ V4SF V2DF V8SF V4DF])
-;; The standard names for fma is only available with SSE math enabled.
(define_expand "fma<mode>4"
- [(set (match_operand:FMAMODE 0 "register_operand")
- (fma:FMAMODE
- (match_operand:FMAMODE 1 "nonimmediate_operand")
- (match_operand:FMAMODE 2 "nonimmediate_operand")
- (match_operand:FMAMODE 3 "nonimmediate_operand")))]
- "(TARGET_FMA || TARGET_FMA4) && TARGET_SSE_MATH")
+ [(set (match_operand:FMAMODEM 0 "register_operand")
+ (fma:FMAMODEM
+ (match_operand:FMAMODEM 1 "nonimmediate_operand")
+ (match_operand:FMAMODEM 2 "nonimmediate_operand")
+ (match_operand:FMAMODEM 3 "nonimmediate_operand")))]
+ "TARGET_FMA || TARGET_FMA4")
(define_expand "fms<mode>4"
- [(set (match_operand:FMAMODE 0 "register_operand")
- (fma:FMAMODE
- (match_operand:FMAMODE 1 "nonimmediate_operand")
- (match_operand:FMAMODE 2 "nonimmediate_operand")
- (neg:FMAMODE (match_operand:FMAMODE 3 "nonimmediate_operand"))))]
- "(TARGET_FMA || TARGET_FMA4) && TARGET_SSE_MATH")
+ [(set (match_operand:FMAMODEM 0 "register_operand")
+ (fma:FMAMODEM
+ (match_operand:FMAMODEM 1 "nonimmediate_operand")
+ (match_operand:FMAMODEM 2 "nonimmediate_operand")
+ (neg:FMAMODEM (match_operand:FMAMODEM 3 "nonimmediate_operand"))))]
+ "TARGET_FMA || TARGET_FMA4")
(define_expand "fnma<mode>4"
- [(set (match_operand:FMAMODE 0 "register_operand")
- (fma:FMAMODE
- (neg:FMAMODE (match_operand:FMAMODE 1 "nonimmediate_operand"))
- (match_operand:FMAMODE 2 "nonimmediate_operand")
- (match_operand:FMAMODE 3 "nonimmediate_operand")))]
- "(TARGET_FMA || TARGET_FMA4) && TARGET_SSE_MATH")
+ [(set (match_operand:FMAMODEM 0 "register_operand")
+ (fma:FMAMODEM
+ (neg:FMAMODEM (match_operand:FMAMODEM 1 "nonimmediate_operand"))
+ (match_operand:FMAMODEM 2 "nonimmediate_operand")
+ (match_operand:FMAMODEM 3 "nonimmediate_operand")))]
+ "TARGET_FMA || TARGET_FMA4")
(define_expand "fnms<mode>4"
- [(set (match_operand:FMAMODE 0 "register_operand")
- (fma:FMAMODE
- (neg:FMAMODE (match_operand:FMAMODE 1 "nonimmediate_operand"))
- (match_operand:FMAMODE 2 "nonimmediate_operand")
- (neg:FMAMODE (match_operand:FMAMODE 3 "nonimmediate_operand"))))]
- "(TARGET_FMA || TARGET_FMA4) && TARGET_SSE_MATH")
+ [(set (match_operand:FMAMODEM 0 "register_operand")
+ (fma:FMAMODEM
+ (neg:FMAMODEM (match_operand:FMAMODEM 1 "nonimmediate_operand"))
+ (match_operand:FMAMODEM 2 "nonimmediate_operand")
+ (neg:FMAMODEM (match_operand:FMAMODEM 3 "nonimmediate_operand"))))]
+ "TARGET_FMA || TARGET_FMA4")
+
+;; The builtins for intrinsics are not constrained by SSE math enabled.
+(define_mode_iterator FMAMODE [SF DF V4SF V2DF V8SF V4DF])
-;; The builtin for intrinsics is not constrained by SSE math enabled.
(define_expand "fma4i_fmadd_<mode>"
[(set (match_operand:FMAMODE 0 "register_operand")
(fma:FMAMODE
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6fbe2cff00f..7363f7c6344 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1,7 +1,7 @@
/* Subroutines used for code generation on IBM RS/6000.
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
- 2012
+ 2012, 2013
Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
@@ -2646,7 +2646,7 @@ rs6000_option_override_internal (bool global_init_p)
#endif
#ifdef OS_MISSING_ALTIVEC
if (OS_MISSING_ALTIVEC)
- set_masks &= ~MASK_ALTIVEC;
+ set_masks &= ~(MASK_ALTIVEC | MASK_VSX);
#endif
/* Don't override by the processor default if given explicitly. */
@@ -3753,7 +3753,8 @@ rs6000_builtin_vectorized_libmass (tree fndecl, tree type_out, tree type_in)
bdecl = builtin_decl_implicit (fn);
suffix = "d2"; /* pow -> powd2 */
if (el_mode != DFmode
- || n != 2)
+ || n != 2
+ || !bdecl)
return NULL_TREE;
break;
@@ -3790,7 +3791,8 @@ rs6000_builtin_vectorized_libmass (tree fndecl, tree type_out, tree type_in)
bdecl = builtin_decl_implicit (fn);
suffix = "4"; /* powf -> powf4 */
if (el_mode != SFmode
- || n != 4)
+ || n != 4
+ || !bdecl)
return NULL_TREE;
break;
@@ -3803,6 +3805,9 @@ rs6000_builtin_vectorized_libmass (tree fndecl, tree type_out, tree type_in)
gcc_assert (suffix != NULL);
bname = IDENTIFIER_POINTER (DECL_NAME (bdecl));
+ if (!bname)
+ return NULL_TREE;
+
strcpy (name, bname + sizeof ("__builtin_") - 1);
strcat (name, suffix);
@@ -17494,8 +17499,9 @@ rs6000_savres_strategy (rs6000_stack_t *info,
static chain is rarely used anyway. FPRs are saved w.r.t the stack
pointer on Darwin. */
if (using_static_chain_p)
- strategy |= (DEFAULT_ABI == ABI_DARWIN ? 0 : SAVE_INLINE_FPRS)
- | SAVE_INLINE_GPRS;
+ strategy |= ((DEFAULT_ABI == ABI_DARWIN
+ ? 0 : SAVE_INLINE_FPRS | REST_INLINE_FPRS)
+ | SAVE_INLINE_GPRS);
/* If we are going to use store multiple, then don't even bother
with the out-of-line routines, since the store-multiple
diff --git a/gcc/configure b/gcc/configure
index e69d9fddfb0..a6edfa20ddb 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -23908,6 +23908,12 @@ elif test x$gcc_cv_ld != x; then
gcc_cv_ld_static_dynamic=yes
else
case "$target" in
+ # AIX ld uses -b flags
+ *-*-aix4.[23]* | *-*-aix[5-9]*)
+ gcc_cv_ld_static_dynamic=yes
+ gcc_cv_ld_static_option="-bstatic"
+ gcc_cv_ld_dynamic_option="-bdynamic"
+ ;;
# Tru64 UNIX support -noso/-so_archive instead of -Bstatic/-Bdynamic.
alpha*-dec-osf*)
gcc_cv_ld_static_dynamic=yes
diff --git a/gcc/configure.ac b/gcc/configure.ac
index b30b926a953..93143806ca2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3357,6 +3357,12 @@ elif test x$gcc_cv_ld != x; then
gcc_cv_ld_static_dynamic=yes
else
case "$target" in
+ # AIX ld uses -b flags
+ *-*-aix4.[[23]]* | *-*-aix[[5-9]]*)
+ gcc_cv_ld_static_dynamic=yes
+ gcc_cv_ld_static_option="-bstatic"
+ gcc_cv_ld_dynamic_option="-bdynamic"
+ ;;
# Tru64 UNIX support -noso/-so_archive instead of -Bstatic/-Bdynamic.
alpha*-dec-osf*)
gcc_cv_ld_static_dynamic=yes
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c3a28f59c53..4f342c5e33c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,80 @@
+2013-02-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/40405
+ * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
+ if we got the wrong number of template parms.
+
+ PR c++/56395
+ * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
+ args.
+
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2013-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56241
+ * init.c (build_vec_init): Don't append NULL values into new_vec.
+ (build_zero_init_1): Don't push anything into v if recursive call
+ returned NULL_TREE.
+ (build_value_init_noctor): Don't push anything into v if
+ build_value_init call returned NULL_TREE.
+
+ PR c++/56239
+ * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
+ (cp_parser_tokens_start_cast_expression): ... this. Change parameter
+ to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
+ return true only if 2nd token isn't CPP_CLOSE_PAREN.
+ (cp_parser_cast_expression): Adjust caller.
+
+ PR c++/56237
+ * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
+ only if DECL_DISCRIMINATOR_SET_P (t) rather than just
+ DECL_LANG_SPECIFIC (t).
+
+2013-02-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/54276
+ * semantics.c (finish_id_expression): Also return the identifier
+ for an outer local static.
+
+ PR c++/52026
+ * semantics.c (finish_id_expression): In a template, return
+ the identifier for a constant variable.
+
+ PR c++/55710
+ * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
+ TREE_USED.
+
+ PR c++/56135
+ * pt.c (tsubst_copy_and_build): Don't forget any new
+ captures that arose from use of dependent names.
+
+2013-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/56291
+ * semantics.c (sort_constexpr_mem_initializers): Handle
+ vptr out of order.
+
+2013-02-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/56268
+ * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
+ maybe_instantiate_noexcept.
+
+2013-02-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/56247
+ * pt.c (eq_specializations): Set comparing_specializations.
+ * tree.c (cp_tree_equal): Check it.
+ * cp-tree.h: Declare it.
+
+2013-02-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/54122
+ * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
+ METHOD_TYPE.
+
2013-02-01 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index bc9dfef2885..0c1601b474a 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4205,6 +4205,10 @@ extern GTY(()) tree integer_two_node;
function, two inside the body of a function in a local class, etc.) */
extern int function_depth;
+/* Nonzero if we are inside eq_specializations, which affects comparison of
+ PARM_DECLs in cp_tree_equal. */
+extern int comparing_specializations;
+
/* In parser.c. */
/* Nonzero if we are parsing an unevaluated operand: an operand to
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 48143963e4d..f200483afef 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -917,7 +917,7 @@ push_local_name (tree decl)
if (!DECL_LANG_SPECIFIC (decl))
retrofit_lang_decl (decl);
DECL_LANG_SPECIFIC (decl)->u.base.u2sel = 1;
- if (DECL_LANG_SPECIFIC (t))
+ if (DECL_DISCRIMINATOR_SET_P (t))
DECL_DISCRIMINATOR (decl) = DECL_DISCRIMINATOR (t) + 1;
else
DECL_DISCRIMINATOR (decl) = 1;
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 39db56169c5..afd082c24bc 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -254,21 +254,23 @@ build_zero_init_1 (tree type, tree nelts, bool static_storage_p,
have an upper bound of -1. */
if (!tree_int_cst_equal (max_index, integer_minus_one_node))
{
- constructor_elt *ce;
-
- v = VEC_alloc (constructor_elt, gc, 1);
- ce = VEC_quick_push (constructor_elt, v, NULL);
+ constructor_elt ce;
/* If this is a one element array, we just use a regular init. */
if (tree_int_cst_equal (size_zero_node, max_index))
- ce->index = size_zero_node;
+ ce.index = size_zero_node;
else
- ce->index = build2 (RANGE_EXPR, sizetype, size_zero_node,
- max_index);
+ ce.index = build2 (RANGE_EXPR, sizetype, size_zero_node,
+ max_index);
- ce->value = build_zero_init_1 (TREE_TYPE (type),
- /*nelts=*/NULL_TREE,
- static_storage_p, NULL_TREE);
+ ce.value = build_zero_init_1 (TREE_TYPE (type),
+ /*nelts=*/NULL_TREE,
+ static_storage_p, NULL_TREE);
+ if (ce.value)
+ {
+ v = VEC_alloc (constructor_elt, gc, 1);
+ *VEC_quick_push (constructor_elt, v, NULL) = ce;
+ }
}
/* Build a constructor to contain the initializations. */
@@ -449,28 +451,31 @@ build_value_init_noctor (tree type, tsubst_flags_t complain)
have an upper bound of -1. */
if (!tree_int_cst_equal (max_index, integer_minus_one_node))
{
- constructor_elt *ce;
-
- v = VEC_alloc (constructor_elt, gc, 1);
- ce = VEC_quick_push (constructor_elt, v, NULL);
+ constructor_elt ce;
/* If this is a one element array, we just use a regular init. */
if (tree_int_cst_equal (size_zero_node, max_index))
- ce->index = size_zero_node;
+ ce.index = size_zero_node;
else
- ce->index = build2 (RANGE_EXPR, sizetype, size_zero_node,
- max_index);
+ ce.index = build2 (RANGE_EXPR, sizetype, size_zero_node,
+ max_index);
- ce->value = build_value_init (TREE_TYPE (type), complain);
+ ce.value = build_value_init (TREE_TYPE (type), complain);
- if (ce->value == error_mark_node)
- return error_mark_node;
+ if (ce.value)
+ {
+ if (ce.value == error_mark_node)
+ return error_mark_node;
+
+ v = VEC_alloc (constructor_elt, gc, 1);
+ *VEC_quick_push (constructor_elt, v, NULL) = ce;
- /* We shouldn't have gotten here for anything that would need
- non-trivial initialization, and gimplify_init_ctor_preeval
- would need to be fixed to allow it. */
- gcc_assert (TREE_CODE (ce->value) != TARGET_EXPR
- && TREE_CODE (ce->value) != AGGR_INIT_EXPR);
+ /* We shouldn't have gotten here for anything that would need
+ non-trivial initialization, and gimplify_init_ctor_preeval
+ would need to be fixed to allow it. */
+ gcc_assert (TREE_CODE (ce.value) != TARGET_EXPR
+ && TREE_CODE (ce.value) != AGGR_INIT_EXPR);
+ }
}
/* Build a constructor to contain the initializations. */
@@ -3335,9 +3340,12 @@ build_vec_init (tree base, tree maxindex, tree init,
else
{
if (do_static_init)
- CONSTRUCTOR_APPEND_ELT (new_vec, field,
- build_zero_init (TREE_TYPE (e),
- NULL_TREE, true));
+ {
+ tree value = build_zero_init (TREE_TYPE (e), NULL_TREE,
+ true);
+ if (value)
+ CONSTRUCTOR_APPEND_ELT (new_vec, field, value);
+ }
saw_non_const = true;
}
}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index e701d209f01..fa82cf2c823 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7010,8 +7010,9 @@ cp_parser_delete_expression (cp_parser* parser)
otherwise. */
static bool
-cp_parser_token_starts_cast_expression (cp_token *token)
+cp_parser_tokens_start_cast_expression (cp_parser *parser)
{
+ cp_token *token = cp_lexer_peek_token (parser->lexer);
switch (token->type)
{
case CPP_COMMA:
@@ -7052,6 +7053,12 @@ cp_parser_token_starts_cast_expression (cp_token *token)
case CPP_EOF:
return false;
+ case CPP_OPEN_PAREN:
+ /* In ((type ()) () the last () isn't a valid cast-expression,
+ so the whole must be parsed as postfix-expression. */
+ return cp_lexer_peek_nth_token (parser->lexer, 2)->type
+ != CPP_CLOSE_PAREN;
+
/* '[' may start a primary-expression in obj-c++. */
case CPP_OPEN_SQUARE:
return c_dialect_objc ();
@@ -7144,8 +7151,7 @@ cp_parser_cast_expression (cp_parser *parser, bool address_p, bool cast_p,
parenthesized ctor such as `(T ())' that looks like a cast to
function returning T. */
if (!cp_parser_error_occurred (parser)
- && cp_parser_token_starts_cast_expression (cp_lexer_peek_token
- (parser->lexer)))
+ && cp_parser_tokens_start_cast_expression (parser))
{
cp_parser_parse_definitely (parser);
expr = cp_parser_cast_expression (parser,
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 4cadda8911f..d8b77ad0fed 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1459,14 +1459,21 @@ register_specialization (tree spec, tree tmpl, tree args, bool is_friend,
/* Returns true iff two spec_entry nodes are equivalent. Only compares the
TMPL and ARGS members, ignores SPEC. */
+int comparing_specializations;
+
static int
eq_specializations (const void *p1, const void *p2)
{
const spec_entry *e1 = (const spec_entry *)p1;
const spec_entry *e2 = (const spec_entry *)p2;
+ int equal;
+
+ ++comparing_specializations;
+ equal = (e1->tmpl == e2->tmpl
+ && comp_template_args (e1->args, e2->args));
+ --comparing_specializations;
- return (e1->tmpl == e2->tmpl
- && comp_template_args (e1->args, e2->args));
+ return equal;
}
/* Returns a hash for a template TMPL and template arguments ARGS. */
@@ -4733,6 +4740,8 @@ push_template_decl_real (tree decl, bool is_friend)
error ("got %d template parameters for %q#T",
TREE_VEC_LENGTH (a), current);
error (" but %d required", TREE_VEC_LENGTH (t));
+ /* Avoid crash in import_export_decl. */
+ DECL_INTERFACE_KNOWN (decl) = 1;
return error_mark_node;
}
@@ -14109,9 +14118,11 @@ tsubst_copy_and_build (tree t,
complete_type (type);
/* The capture list refers to closure members, so this needs to
- wait until after we finish instantiating the type. */
+ wait until after we finish instantiating the type. Also keep
+ any captures that may have been added during instantiation. */
LAMBDA_EXPR_CAPTURE_LIST (r)
- = RECUR (LAMBDA_EXPR_CAPTURE_LIST (t));
+ = chainon (RECUR (LAMBDA_EXPR_CAPTURE_LIST (t)),
+ LAMBDA_EXPR_CAPTURE_LIST (r));
LAMBDA_EXPR_THIS_CAPTURE (r) = NULL_TREE;
return build_lambda_object (r);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index d39d50a5f44..0ad32a08518 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2822,18 +2822,26 @@ baselink_for_fns (tree fns)
return build_baselink (cl, cl, fns, /*optype=*/NULL_TREE);
}
-/* Returns true iff DECL is an automatic variable from a function outside
+/* Returns true iff DECL is a variable from a function outside
the current one. */
static bool
-outer_automatic_var_p (tree decl)
+outer_var_p (tree decl)
{
return ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL)
&& DECL_FUNCTION_SCOPE_P (decl)
- && !TREE_STATIC (decl)
&& DECL_CONTEXT (decl) != current_function_decl);
}
+/* As above, but also checks that DECL is automatic. */
+
+static bool
+outer_automatic_var_p (tree decl)
+{
+ return (outer_var_p (decl)
+ && !TREE_STATIC (decl));
+}
+
/* ID_EXPRESSION is a representation of parsed, but unprocessed,
id-expression. (See cp_parser_id_expression for details.) SCOPE,
if non-NULL, is the type or namespace used to explicitly qualify
@@ -2940,9 +2948,18 @@ finish_id_expression (tree id_expression,
/* Disallow uses of local variables from containing functions, except
within lambda-expressions. */
- if (outer_automatic_var_p (decl)
+ if (!outer_var_p (decl)
/* It's not a use (3.2) if we're in an unevaluated context. */
- && !cp_unevaluated_operand)
+ || cp_unevaluated_operand)
+ /* OK. */;
+ else if (TREE_STATIC (decl))
+ {
+ if (processing_template_decl)
+ /* For a use of an outer static var, return the identifier so
+ that we'll look it up again in the instantiation. */
+ return id_expression;
+ }
+ else
{
tree context = DECL_CONTEXT (decl);
tree containing_function = current_function_decl;
@@ -2961,7 +2978,14 @@ finish_id_expression (tree id_expression,
FIXME update for final resolution of core issue 696. */
if (decl_constant_var_p (decl))
- return integral_constant_value (decl);
+ {
+ if (processing_template_decl)
+ /* In a template, the constant value may not be in a usable
+ form, so look it up again at instantiation time. */
+ return id_expression;
+ else
+ return integral_constant_value (decl);
+ }
/* If we are in a lambda function, we can move out until we hit
1. the context,
@@ -5351,6 +5375,7 @@ classtype_has_nothrow_assign_or_copy_p (tree type, bool assign_p)
else if (copy_fn_p (fn) <= 0)
continue;
+ maybe_instantiate_noexcept (fn);
if (!TYPE_NOTHROW_P (TREE_TYPE (fn)))
return false;
}
@@ -5884,31 +5909,38 @@ check_constexpr_ctor_body (tree last, tree list)
/* VEC is a vector of constructor elements built up for the base and member
initializers of a constructor for TYPE. They need to be in increasing
offset order, which they might not be yet if TYPE has a primary base
- which is not first in the base-clause. */
+ which is not first in the base-clause or a vptr and at least one base
+ all of which are non-primary. */
static VEC(constructor_elt,gc) *
sort_constexpr_mem_initializers (tree type, VEC(constructor_elt,gc) *vec)
{
tree pri = CLASSTYPE_PRIMARY_BINFO (type);
+ tree field_type;
constructor_elt elt;
int i;
- if (pri == NULL_TREE
- || pri == BINFO_BASE_BINFO (TYPE_BINFO (type), 0))
+ if (pri)
+ field_type = BINFO_TYPE (pri);
+ else if (TYPE_CONTAINS_VPTR_P (type))
+ field_type = vtbl_ptr_type_node;
+ else
return vec;
- /* Find the element for the primary base and move it to the beginning of
- the vec. */
- pri = BINFO_TYPE (pri);
- for (i = 1; ; ++i)
- if (TREE_TYPE (VEC_index (constructor_elt, vec, i)->index) == pri)
+ /* Find the element for the primary base or vptr and move it to the
+ beginning of the vec. */
+ for (i = 0; ; ++i)
+ if (TREE_TYPE (VEC_index (constructor_elt, vec, i)->index) == field_type)
break;
- elt = *VEC_index (constructor_elt, vec, i);
- for (; i > 0; --i)
- VEC_replace (constructor_elt, vec, i,
- VEC_index (constructor_elt, vec, i-1));
- VEC_replace (constructor_elt, vec, 0, &elt);
+ if (i > 0)
+ {
+ elt = *VEC_index (constructor_elt, vec, i);
+ for (; i > 0; --i)
+ VEC_replace (constructor_elt, vec, i,
+ VEC_index (constructor_elt, vec, i-1));
+ VEC_replace (constructor_elt, vec, 0, &elt);
+ }
return vec;
}
@@ -9402,6 +9434,8 @@ maybe_add_lambda_conv_op (tree type)
body = begin_function_body ();
compound_stmt = begin_compound_stmt (0);
+ /* decl_needed_p needs to see that it's used. */
+ TREE_USED (statfn) = 1;
finish_return_stmt (decay_conversion (statfn));
finish_compound_stmt (compound_stmt);
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 793e7fad51c..8909c72bb8c 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -143,9 +143,7 @@ lvalue_kind (const_tree ref)
case ARRAY_REF:
case PARM_DECL:
case RESULT_DECL:
- if (TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE)
- return clk_ordinary;
- break;
+ return clk_ordinary;
/* A scope ref in a template, left as SCOPE_REF to support later
access checking. */
@@ -1209,9 +1207,35 @@ strip_typedefs (tree t)
}
break;
case TYPENAME_TYPE:
- result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t)),
- TYPENAME_TYPE_FULLNAME (t),
- typename_type, tf_none);
+ {
+ tree fullname = TYPENAME_TYPE_FULLNAME (t);
+ if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR)
+ {
+ tree args = TREE_OPERAND (fullname, 1);
+ tree new_args = copy_node (args);
+ bool changed = false;
+ int i;
+ for (i = 0; i < TREE_VEC_LENGTH (args); ++i)
+ {
+ tree arg = TREE_VEC_ELT (args, i);
+ tree strip_arg;
+ if (TYPE_P (arg))
+ strip_arg = strip_typedefs (arg);
+ else
+ strip_arg = strip_typedefs_expr (arg);
+ TREE_VEC_ELT (new_args, i) = strip_arg;
+ if (strip_arg != arg)
+ changed = true;
+ }
+ if (changed)
+ fullname = lookup_template_function (TREE_OPERAND (fullname, 0),
+ new_args);
+ else
+ ggc_free (new_args);
+ }
+ result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t)),
+ fullname, typename_type, tf_none);
+ }
break;
case DECLTYPE_TYPE:
result = strip_typedefs_expr (DECLTYPE_TYPE_EXPR (t));
@@ -2571,6 +2595,13 @@ cp_tree_equal (tree t1, tree t2)
with an out-of-class definition of the function, but can also come
up for expressions that involve 'this' in a member function
template. */
+
+ if (comparing_specializations)
+ /* When comparing hash table entries, only an exact match is
+ good enough; we don't want to replace 'this' with the
+ version from another function. */
+ return false;
+
if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
{
if (DECL_ARTIFICIAL (t1) ^ DECL_ARTIFICIAL (t2))
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5cb02ed7a3f..90e9229a1a1 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5444,7 +5444,7 @@ Dump after the peephole pass.
@opindex fdump-rtl-postreload
Dump after post-reload optimizations.
-@itemx -fdump-rtl-pro_and_epilogue
+@item -fdump-rtl-pro_and_epilogue
@opindex fdump-rtl-pro_and_epilogue
Dump after generating the function prologues and epilogues.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 06c6c9de4cf..4ac66f90d56 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -10603,7 +10603,16 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset,
}
}
- regno = DWARF_FRAME_REGNUM (REGNO (reg));
+ regno = REGNO (reg);
+#ifdef LEAF_REG_REMAP
+ if (current_function_uses_only_leaf_regs)
+ {
+ int leaf_reg = LEAF_REG_REMAP (regno);
+ if (leaf_reg != -1)
+ regno = (unsigned) leaf_reg;
+ }
+#endif
+ regno = DWARF_FRAME_REGNUM (regno);
if (!optimize && fde
&& (fde->drap_reg == regno || fde->vdrap_reg == regno))
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 077d0d79b8a..68950742824 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2199,7 +2199,8 @@ expand_shift_1 (enum tree_code code, enum machine_mode mode, rtx shifted,
% GET_MODE_BITSIZE (mode));
else if (GET_CODE (op1) == SUBREG
&& subreg_lowpart_p (op1)
- && INTEGRAL_MODE_P (GET_MODE (SUBREG_REG (op1))))
+ && SCALAR_INT_MODE_P (GET_MODE (SUBREG_REG (op1)))
+ && SCALAR_INT_MODE_P (GET_MODE (op1)))
op1 = SUBREG_REG (op1);
}
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 7f17b89b6d3..1f864a78ce9 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -5716,6 +5716,11 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type,
break;
/* FALLTHROUGH */
case NEGATE_EXPR:
+ /* For division and modulus, type can't be unsigned, as e.g.
+ (-(x / 2U)) / 2U isn't equal to -((x / 2U) / 2U) for x >= 2.
+ For signed types, even with wrapping overflow, this is fine. */
+ if (code != MULT_EXPR && TYPE_UNSIGNED (type))
+ break;
if ((t1 = extract_muldiv (op0, c, code, wide_type, strict_overflow_p))
!= 0)
return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 91618a1a96f..c2a7a8b8ff0 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,31 @@
+2013-02-22 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56385
+ * trans-array.c (structure_alloc_comps): Handle procedure-pointer
+ components with allocatable result.
+
+2013-02-17 Tobias Burnus <burnus@net-b.de>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ Backport from trunk
+ 2013-01-28 Tobias Burnus <burnus@net-b.de>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/53537
+ * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
+ interface block.
+ (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
+ * decl.c (gfc_match_data_decl): Ditto.
+ (variable_decl): Remove undeclared type error.
+ (gfc_match_import): Use renamed instead of original name.
+
+2013-02-15 Tobias Burnus <burnus@net-b.de>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56318
+ * simplify.c (gfc_simplify_matmul): Fix result shape
+ and matmul result.
+
2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index dbcd2a0a8d2..3e9bc18eda6 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1949,30 +1949,6 @@ variable_decl (int elem)
goto cleanup;
}
- /* An interface body specifies all of the procedure's
- characteristics and these shall be consistent with those
- specified in the procedure definition, except that the interface
- may specify a procedure that is not pure if the procedure is
- defined to be pure(12.3.2). */
- if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS)
- && gfc_current_ns->proc_name
- && gfc_current_ns->proc_name->attr.if_source == IFSRC_IFBODY
- && current_ts.u.derived->ns != gfc_current_ns)
- {
- gfc_symtree *st;
- st = gfc_find_symtree (gfc_current_ns->sym_root, current_ts.u.derived->name);
- if (!(current_ts.u.derived->attr.imported
- && st != NULL
- && gfc_find_dt_in_generic (st->n.sym) == current_ts.u.derived)
- && !gfc_current_ns->has_import_set)
- {
- gfc_error ("The type of '%s' at %C has not been declared within the "
- "interface", name);
- m = MATCH_ERROR;
- goto cleanup;
- }
- }
-
if (check_function_name (name) == FAILURE)
{
m = MATCH_ERROR;
@@ -3160,14 +3136,14 @@ gfc_match_import (void)
return MATCH_ERROR;
}
- if (gfc_find_symtree (gfc_current_ns->sym_root,name))
+ if (gfc_find_symtree (gfc_current_ns->sym_root, name))
{
gfc_warning ("'%s' is already IMPORTed from host scoping unit "
"at %C.", name);
goto next_item;
}
- st = gfc_new_symtree (&gfc_current_ns->sym_root, sym->name);
+ st = gfc_new_symtree (&gfc_current_ns->sym_root, name);
st->n.sym = sym;
sym->refs++;
sym->attr.imported = 1;
@@ -3179,8 +3155,8 @@ gfc_match_import (void)
lower-case name contains the associated generic function. */
st = gfc_new_symtree (&gfc_current_ns->sym_root,
gfc_get_string ("%c%s",
- (char) TOUPPER ((unsigned char) sym->name[0]),
- &sym->name[1]));
+ (char) TOUPPER ((unsigned char) name[0]),
+ &name[1]));
st->n.sym = sym;
sym->refs++;
sym->attr.imported = 1;
@@ -4231,7 +4207,7 @@ gfc_match_data_decl (void)
goto ok;
gfc_find_symbol (current_ts.u.derived->name,
- current_ts.u.derived->ns->parent, 1, &sym);
+ current_ts.u.derived->ns, 1, &sym);
/* Any symbol that we find had better be a type definition
which has its components defined. */
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index f1219d61c18..4ce7d138e45 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -3839,7 +3839,7 @@ gfc_simplify_matmul (gfc_expr *matrix_a, gfc_expr *matrix_b)
if (matrix_a->rank == 1 && matrix_b->rank == 2)
{
result_rows = 1;
- result_columns = mpz_get_si (matrix_b->shape[0]);
+ result_columns = mpz_get_si (matrix_b->shape[1]);
stride_a = 1;
stride_b = mpz_get_si (matrix_b->shape[0]);
@@ -3849,7 +3849,7 @@ gfc_simplify_matmul (gfc_expr *matrix_a, gfc_expr *matrix_b)
}
else if (matrix_a->rank == 2 && matrix_b->rank == 1)
{
- result_rows = mpz_get_si (matrix_b->shape[0]);
+ result_rows = mpz_get_si (matrix_a->shape[0]);
result_columns = 1;
stride_a = mpz_get_si (matrix_a->shape[0]);
stride_b = 1;
@@ -3862,7 +3862,7 @@ gfc_simplify_matmul (gfc_expr *matrix_a, gfc_expr *matrix_b)
{
result_rows = mpz_get_si (matrix_a->shape[0]);
result_columns = mpz_get_si (matrix_b->shape[1]);
- stride_a = mpz_get_si (matrix_a->shape[1]);
+ stride_a = mpz_get_si (matrix_a->shape[0]);
stride_b = mpz_get_si (matrix_b->shape[0]);
result->rank = 2;
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 0cd7cc8d3e3..dcf40d9a47f 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -2650,6 +2650,11 @@ gfc_find_sym_tree (const char *name, gfc_namespace *ns, int parent_flag,
if (!parent_flag)
break;
+ /* Don't escape an interface block. */
+ if (ns && !ns->has_import_set
+ && ns->proc_name && ns->proc_name->attr.if_source == IFSRC_IFBODY)
+ break;
+
ns = ns->parent;
}
while (ns != NULL);
@@ -2808,17 +2813,14 @@ gfc_get_ha_sym_tree (const char *name, gfc_symtree **result)
return i;
}
- if (gfc_current_ns->parent != NULL)
- {
- i = gfc_find_sym_tree (name, gfc_current_ns->parent, 1, &st);
- if (i)
- return i;
+ i = gfc_find_sym_tree (name, gfc_current_ns, 1, &st);
+ if (i)
+ return i;
- if (st != NULL)
- {
- *result = st;
- return 0;
- }
+ if (st != NULL)
+ {
+ *result = st;
+ return 0;
}
return gfc_get_sym_tree (name, gfc_current_ns, result, false);
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index d3114798c6d..4b701710f75 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -7392,8 +7392,8 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
called_dealloc_with_status = false;
gfc_init_block (&tmpblock);
- if (c->attr.allocatable
- && (c->attr.dimension || c->attr.codimension))
+ if (c->attr.allocatable && (c->attr.dimension || c->attr.codimension)
+ && !c->attr.proc_pointer)
{
comp = fold_build3_loc (input_location, COMPONENT_REF, ctype,
decl, cdecl, NULL_TREE);
@@ -7575,7 +7575,8 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
continue;
}
- if (c->attr.allocatable && !cmp_has_alloc_comps)
+ if (c->attr.allocatable && !c->attr.proc_pointer
+ && !cmp_has_alloc_comps)
{
rank = c->as ? c->as->rank : 0;
tmp = gfc_duplicate_allocatable (dcmp, comp, ctype, rank);
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index ee796cbb7e9..9e6800d4b2a 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -2164,31 +2164,31 @@ ggc_print_statistics (void)
{
fprintf (stderr, "\nTotal allocations and overheads during the compilation process\n");
- fprintf (stderr, "Total Overhead: %10lld\n",
+ fprintf (stderr, "Total Overhead: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_overhead);
- fprintf (stderr, "Total Allocated: %10lld\n",
+ fprintf (stderr, "Total Allocated: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_allocated);
- fprintf (stderr, "Total Overhead under 32B: %10lld\n",
+ fprintf (stderr, "Total Overhead under 32B: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_overhead_under32);
- fprintf (stderr, "Total Allocated under 32B: %10lld\n",
+ fprintf (stderr, "Total Allocated under 32B: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_allocated_under32);
- fprintf (stderr, "Total Overhead under 64B: %10lld\n",
+ fprintf (stderr, "Total Overhead under 64B: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_overhead_under64);
- fprintf (stderr, "Total Allocated under 64B: %10lld\n",
+ fprintf (stderr, "Total Allocated under 64B: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_allocated_under64);
- fprintf (stderr, "Total Overhead under 128B: %10lld\n",
+ fprintf (stderr, "Total Overhead under 128B: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_overhead_under128);
- fprintf (stderr, "Total Allocated under 128B: %10lld\n",
+ fprintf (stderr, "Total Allocated under 128B: %10" HOST_LONG_LONG_FORMAT "d\n",
G.stats.total_allocated_under128);
for (i = 0; i < NUM_ORDERS; i++)
if (G.stats.total_allocated_per_order[i])
{
- fprintf (stderr, "Total Overhead page size %7lu: %10lld\n",
+ fprintf (stderr, "Total Overhead page size %7lu: %10" HOST_LONG_LONG_FORMAT "d\n",
(unsigned long) OBJECT_SIZE (i),
G.stats.total_overhead_per_order[i]);
- fprintf (stderr, "Total Allocated page size %7lu: %10lld\n",
+ fprintf (stderr, "Total Allocated page size %7lu: %10" HOST_LONG_LONG_FORMAT "d\n",
(unsigned long) OBJECT_SIZE (i),
G.stats.total_allocated_per_order[i]);
}
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 878f11066b5..cb3d10e5d12 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,16 @@
+2013-02-09 Uros Bizjak <ubizjak@gmail.com>
+
+ * lto.c: Include output.h.
+
+2013-02-07 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2013-02-07 Uros Bizjak <ubizjak@gmail.com>
+
+ PR bootstrap/56227
+ * lto.c (lto_resolution_ready): Use %wx instead of
+ HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
+
2012-09-20 Richard Guenther <rguenther@suse.de>
Backport from mainline
@@ -580,7 +593,7 @@
2010-09-16 Jan Hubicka <jh@suse.cz>
* lto.c (lto_materialize_function): Do not tamper with STATIC and
- EXTERNAL flags.
+ EXTERNAL flags.
2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
@@ -1039,7 +1052,7 @@
* lto.c (O_BINARY): Define.
(lto_read_section_data): Open file in binary mode.
* lto-elf.c (O_BINARY): Define.
- (lto_elf_file_open): Open file in binary mode.
+ (lto_elf_file_open): Open file in binary mode.
2010-01-08 Richard Guenther <rguenther@suse.de>
@@ -1599,7 +1612,7 @@
2009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
- * Make-lang.in (LTO_EXE): Link with all
+ * Make-lang.in (LTO_EXE): Link with all
BACKENDLIBS and not only GMPLIBS
2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
@@ -1799,7 +1812,7 @@
exceptions flag is given.
* lto-lang.c: (lto_init_options) Set default exceptions flag.
(lto_init_eh): Remove exceptions flag initialization.
- (lto_init): Only call lto_init_eh if exceptions flag is set.
+ (lto_init): Only call lto_init_eh if exceptions flag is set.
2008-10-21 Diego Novillo <dnovillo@google.com>
@@ -1930,7 +1943,7 @@
* lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
bodies affected by exception attribute merging of DECLs.
* lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
- merging.
+ merging.
2008-09-25 Rafael Espindola <espindola@google.com>
@@ -2066,7 +2079,7 @@
2008-08-04 Bill Maddox <maddox@google.com>
* lto-symtab.c (lto_symtab_merge_decl): Add comment.
-
+
2008-09-03 Doug Kwan <dougkwan@google.com>
lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
@@ -2122,7 +2135,7 @@
(lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
New functions.
(lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
- * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
+ * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
variable LTO_SECTION_IN_H.
(lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
@@ -2138,12 +2151,12 @@
asserting.
(lto_post_options): Suppress debug info generation.
* Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
-
+
2008-08-25 Bill Maddox <maddox@google.com>
* lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
assertion and leave an explanatory comment in its place.
-
+
2008-08-21 Doug Kwan <dougkwan@google.com>
* lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
@@ -2173,21 +2186,21 @@
* lto.h (struct lto_file_struct): Remove GTY marker.
* config-lang.in: Remove lto/lto.h and lto/lto.c from
gtfiles.
-
+
2008-08-20 Bill Maddox <maddox@google.com>
* lto.c (lto_read_decls): Provide dummy argument to input_tree
to conform to its new signature.
* lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
on discarded node here, now called in global_vector_fixup.
-
+
2008-08-09 Bill Maddox <maddox@google.com>
* lto.c (preload_common_nodes): Verify that fileptr_type_node
has not been set to a front-end-specific value.
-
+
2008-08-05 Doug Kwan <dougkwan@google.com>
-
+
* Make-lang.in (lto-symtab.o): Add missing dependencies to fix
build breakage.
@@ -2406,7 +2419,7 @@
2008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
Jan Hubicka <jh@suse.cz>
-
+
* lto.c (sys/mman.h, tree-pass.h): New includes.
(lto_materialize_constructors_and_inits,
lto_materialize_function): Keeps length of section.
@@ -2418,12 +2431,12 @@
(lto_read_section_data, get_section_data, free_section_data): New
functions.
(lto_main): Now calls pass manager, sets the hooks so that the ipa
- passes can get the section data.
-
+ passes can get the section data.
+
2008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto.h (lto_read_decls): Made local.
- (lto_input_function_body, lto_input_constructors_and_inits,
+ (lto_input_function_body, lto_input_constructors_and_inits,
lto_input_cgraph): Declarations moved to lto-section-in.h.
* lto-section-in.c: Moved to .. .
* lto-cgraph-in.c: Ditto.
@@ -2434,7 +2447,6 @@
(LANG_HOOKS_INSERT_BLOCK): Removed.
* Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
lto-section-in.o): Rules moved to lto/Makefile.in.
-
2008-05-16 Ollie Wild <aaw@google.com>
@@ -2515,7 +2527,7 @@
(lto_file_read): Made local and initialize dictionary so that
other lto sections can be read without reprocessing the elf file.
(lto_main): Read all functions after all files have been processed
- for their types, globals and cgraph.
+ for their types, globals and cgraph.
* Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
dependencies.
* lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
@@ -2525,7 +2537,7 @@
* lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
(lto_file_read): Made local.
(lto_get_file_name, lto_elf_build_section_table,
- lto_input_cgraph):
+ lto_input_cgraph):
New function.
* lto-section-in.c (lto_read_section_data, lto_get_section_data):
New functions.
@@ -2540,7 +2552,6 @@
* lto_section_in.h (lto_section_slot): New structure.
(section_hash_table.lto_file_decl_data): New field.
-
2008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto.c (lto_read_variable_formal_parameter_const): Remove code to
@@ -2559,7 +2570,7 @@
* lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
lto_section_type parameter.
(lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
- * lto.h (lto_file_vtable_struct): Removed two of the fields and
+ * lto.h (lto_file_vtable_struct): Removed two of the fields and
renamed the other two so that there is only one map function and
one unmap function and each takes a section type parameter.
(lto_read_function_body): Renamed to lto_input_function_body and
@@ -2577,7 +2588,7 @@
(lto_read_function_body, lto_input_constructors_and_inits):
Renamed to lto_input_function_body and takes file_data parameter.
* lto-section-in.h (lto_file_decl_data): New structure.
-
+
2008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-function-in.c (input_globals.c): Changed input type to
@@ -2586,8 +2597,8 @@
(input_function): Renumber all stmts after they are input.
(lto_read_body, lto_read_function_body, lto_read_var_init):
Changed to used new header format and enum section_type.
- *lto-lang.c (success): Removed.
-
+ *lto-lang.c (success): Removed.
+
2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
* lto-elf.c (lto_elf_lookup_sym): Remove unused function.
@@ -2619,7 +2630,7 @@
* lto-section-in.c: New file with changes from above.
* Make-lang.in (lto-read.o): Renamed lto-function-in.c.
(lto-section-in.o): New rule.
-
+
2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
* lto-read.c (input_expr_operand): Mark static and external
@@ -2742,7 +2753,7 @@
* lto.h (struct lto_str_fd_struct): New struct.
(struct lto_file_struct): Added new field DEBUG_STR
to hold the file descriptor for the debug string table.
-
+
2007-12-07 Bill Maddox <maddox@google.com>
* lto.c (lto_str_fd_init): New function.
@@ -2858,14 +2869,14 @@
2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
- * lto-read.c (input_expr_operand): Get types right
+ * lto-read.c (input_expr_operand): Get types right
for COMPLEX_CST.
2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (make_new_block, input_cfg): Properly set
n_basic_blocks.
-
+
2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
* lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
@@ -2885,7 +2896,7 @@
(input_expr_operand): Keeps track locally if current node needs a loc.
(input_local_var): Added code to handle DECL_INITIAL for
static local vars. Only set loc if necessary.
-
+
2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
* lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
@@ -2910,14 +2921,14 @@
registered_builtin_fndecls.
2007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
-
+
* lto-read.c (process_tree_flags, lto_static_init_local):
Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
(input_line_info, clear_line_info): Fixed new line number code.
(input_expr_operand): Added type to SWITCH_EXPR.
(lto_read_body): Properly initialized data_in.
Clear line info when leaving.
-
+
2007-11-13 Diego Novillo <dnovillo@google.com>
* lto.c (lto_read_variable_formal_parameter_constant_DIE):
@@ -2930,11 +2941,11 @@
2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (input_type_ref): Renamed from get_type_ref.
- (input_expr_operand, input_local_var): Renamed get_type_ref to
+ (input_expr_operand, input_local_var): Renamed get_type_ref to
input_type_ref.
- (input_expr_operand): Get the types correct for
+ (input_expr_operand): Get the types correct for
vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
-
+
2007-11-13 Doug Kwan <dougkwan@google.com>
* lto-read.c (input_widest_uint_uleb128): New function.
@@ -2952,7 +2963,7 @@
DW_AT_static_link and DW_AT_specification. Return the
specification if present.
(lto_read_base_type_DIE): Handle DW_ATE_complex_float.
-
+
2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
* lto-lang.c: Include target.h.
@@ -2968,7 +2979,7 @@
* lto-read.c (input_expr_operand): Added code to properly handle
index filed. Added new RANGE_EXPR case.
-
+
2007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (ADD_FUNC_FLAG): Deleted macro.
@@ -3036,7 +3047,7 @@
read flags of VAR_DECL and FUNCTION_DECL of size>1.
change global array num_flags_for_code to flags_length_for_code.
(set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
-
+
2007-11-05 Nathan Froyd <froydnj@codesourcery.com>
* lto.c (lto_read_structure_union_class_type_DIE): Use proper record
@@ -3082,10 +3093,10 @@
* lto-read.c (data_in): Added type_decls and current_col fields.
(string_slot): New type to hold canonized file name.
- (hash_string_slot_node, eq_string_slot_node, canon_file_name,
+ (hash_string_slot_node, eq_string_slot_node, canon_file_name,
input_line_info, set_line_info, clear_line_info): New functions.
(file_name_hash_table): New hash table.
- (input_local_var, input_labels, input_local_vars_index,
+ (input_local_var, input_labels, input_local_vars_index,
input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
(input_uleb128): Changed type of byte var.
(input_expr_operand): Large number of changes to get line numbers
@@ -3099,7 +3110,6 @@
(lto_read_body): Added code to get TYPE_DECLS read and to change
parameters to the calls above that had their parms reorganized.
-
2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
* lto.h (lto_resolve_typedecl_ref): Declare.
@@ -3121,7 +3131,7 @@
* lto-read.c (input_expr_operand): Give label_values the proper
context and provide switch statements with a default type.
-
+
2007-10-23 Nathan Froyd <froydnj@codesourcery.com>
* lto-read.c (lto_read_body): Move call to init_ssa_operands...
@@ -3155,7 +3165,7 @@
(input_ssa_names): Now calls input_tree_flags.
(lto_read_body): Now sets cfun.
(lto_read_function_body): Now sets current_function_pointer.
-
+
2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
* lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
@@ -3230,8 +3240,7 @@
(input_expr_operand): Make asm operands use input_tree_list.
(input_local_var): Now uses input_tree_list.
(lto_read_body): Change placement for setting context of debug_labels.
-
-
+
2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (input_real): Output debugging in proper order.
@@ -3243,7 +3252,7 @@
written.
(dump_debug_stream): Also print char in hex.
(debug_out_fun): Fix signed unsigned mismatch.
-
+
2007-10-10 Nathan Froyd <froydnj@codesourcery.com>
* lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
@@ -3281,7 +3290,7 @@
2007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (input_expr_operand): Added type for STRING_CST.
-
+
2007-09-10 Nathan Froyd <froydnj@codesourcery.com>
* lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
@@ -3315,33 +3324,32 @@
* lto-read.c (fun_in): Renamed to data_in.
(input_expr_operand, input_local_var, input_string_internal,
- input_string, input_real, input_list, get_label_decl,
+ input_string, input_real, input_list, get_label_decl,
get_type_ref, input_expr_operand, input_globals, input_labels,
- input_local_vars_index, input_local_var, input_local_vars,
+ input_local_vars_index, input_local_var, input_local_vars,
input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
(input_constructor): New function.
(lto_read_function_body): Renamed to lto_read_body and generalized
to handle both functions and constructors.
(lto_read_function_body, lto_read_var_init): New function.
-
-
+
2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (input_expr_operand): Assert that there really is a
FUNCTION_DECL.
(input_globals): Removed checks on 0 section.
-
+
2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (fun_in): Added local_decls_index and
- local_decls_index_d.
+ local_decls_index_d.
(input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
(input_globals): Enabled code to handle FIELD_DECLs.
(input_local_vars_index, input_local_vars): New function.
(input_local_var): Changed to allow locals to be input randomly.
(lto_read_function_body): Added code to input the
local_decls_index and to free various structures.
-
+
2007-08-17 Jim Blandy <jimb@codesourcery.com>
* lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
@@ -3372,7 +3380,7 @@
* lto.c (lto_read_form): Complete attr_classes table.
(DWARF2_form_data): Doc fix.
-
+
2007-08-05 Mark Mitchell <mark@codesourcery.com>
* lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
@@ -3400,13 +3408,11 @@
input_expr_operand, input_local_vars, input_cfg, input_phi,
input_ssa_names, input_bb, input_function): Added semicolons.
-
2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (input_globals): Remove debugging.
(input_function): Set DECL_ARGUMENTS.
-
2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
@@ -3416,8 +3422,7 @@
(input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
(input_flags): New function.
* lto-lang.c (lto_init): Changed state of in_lto_p.
-
-
+
2007-07-24 Mark Mitchell <mark@codesourcery.com>
* lto-tree.h (lto_varargs_cookie): Remove.
@@ -3467,8 +3472,7 @@
(lto_read_function_body): Processes new header fields to construct
streams for the ssa_names and cfg and their debugging.
* lto/lto-lang.c (lto_init): Set in_lto_p.
-
-
+
2007-06-28 Mark Mitchell <mark@codesourcery.com>
* lto.h (lto_file_vtable): Add read_var_init.
@@ -3495,11 +3499,11 @@
* lto-read (make_new_block): Initialize the stmt_list.
(lto_static_init_local): Add debugging for missing codes.
-
+
2007-06-26 Mark Mitchell <mark@codesourcery.com>
* lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
- unprototyped functions.
+ unprototyped functions.
2007-06-23 Mark Mitchell <mark@codesourcery.com>
@@ -3511,9 +3515,9 @@
* lto-symbtab.c: Build function types out of TREE_LISTs.
* lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
-
+
* Make-lang.in (LTO_OBJS): Depend on attribs.o.
-
+
2007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto/lto-tree.h (lang_decl, lang_type, language_function): Added
@@ -3637,7 +3641,7 @@
(lto_read_form): Change first argument to lto_info_fd *.
Add FORM_CONTEXT argument.
Handle DW_FORM_ref_addr.
- (lto_read_tag_DIE): Change first argument to lto_info_fd *.
+ (lto_read_tag_DIE): Change first argument to lto_info_fd *.
(LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
Swap contexts if necessary for form.
(LTO_BEGIN_READ_ATTRS): Cast fd to right type for
@@ -3660,7 +3664,7 @@
* lto.h (DWARF2_CompUnit): New structure.
(lto_info_fd): Ditto.
(lto_file): Change debug_info to be an lto_info_fd.
-
+
2006-06-25 Mark Mitchell <mark@codesourcery.com>
* lto.c (toplev.h): Include it.
@@ -3719,7 +3723,7 @@
(lto_file): Use new types.
(lto_file_close): Declare.
* lto-lang.c (lto_init): Always use unit-at-a-time mode.
-
+
2006-06-18 Mark Mitchell <mark@codesourcery.com>
* lto.h: New file.
@@ -3729,7 +3733,7 @@
(lto.h): Likewise.
(lto_init): New function.
(lto_write_globals): Remove.
- (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
+ (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
(LANG_HOOKS_INIT): Define.
(LANG_HOOKS_PARSE_FILE): Likewise.
* Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 2f100d96704..5398ca8300f 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "toplev.h"
#include "tree.h"
#include "tree-flow.h"
+#include "output.h"
#include "diagnostic-core.h"
#include "tm.h"
#include "cgraph.h"
@@ -1057,8 +1058,7 @@ lto_resolution_read (splay_tree file_ids, FILE *resolution, lto_file *file)
{
nd = lto_splay_tree_lookup (file_ids, id);
if (nd == NULL)
- internal_error ("resolution sub id " HOST_WIDE_INT_PRINT_HEX_PURE
- " not in object file", id);
+ internal_error ("resolution sub id %wx not in object file", id);
}
file_data = (struct lto_file_decl_data *)nd->value;
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 8245b820fef..e5e128c514e 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -758,12 +758,20 @@ use_pointer_for_field (tree decl, omp_context *shared_ctx)
if (TREE_ADDRESSABLE (decl))
return true;
+ /* lower_send_shared_vars only uses copy-in, but not copy-out
+ for these. */
+ if (TREE_READONLY (decl)
+ || ((TREE_CODE (decl) == RESULT_DECL
+ || TREE_CODE (decl) == PARM_DECL)
+ && DECL_BY_REFERENCE (decl)))
+ return false;
+
/* Disallow copy-in/out in nested parallel if
decl is shared in outer parallel, otherwise
each thread could store the shared variable
in its own copy-in location, making the
variable no longer really shared. */
- if (!TREE_READONLY (decl) && shared_ctx->is_nested)
+ if (shared_ctx->is_nested)
{
omp_context *up;
@@ -786,11 +794,10 @@ use_pointer_for_field (tree decl, omp_context *shared_ctx)
}
}
- /* For tasks avoid using copy-in/out, unless they are readonly
- (in which case just copy-in is used). As tasks can be
+ /* For tasks avoid using copy-in/out. As tasks can be
deferred or executed in different thread, when GOMP_task
returns, the task hasn't necessarily terminated. */
- if (!TREE_READONLY (decl) && is_task_ctx (shared_ctx))
+ if (is_task_ctx (shared_ctx))
{
tree outer;
maybe_mark_addressable_and_ret:
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index ed1dddcdcdf..550759af7e7 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -244,7 +244,8 @@ avoid_constant_pool_reference (rtx x)
/* If we're accessing the constant in a different mode than it was
originally stored, attempt to fix that up via subreg simplifications.
If that fails we have no choice but to return the original memory. */
- if (offset != 0 || cmode != GET_MODE (x))
+ if ((offset != 0 || cmode != GET_MODE (x))
+ && offset >= 0 && offset < GET_MODE_SIZE (cmode))
{
rtx tem = simplify_subreg (GET_MODE (x), c, cmode, offset);
if (tem && CONSTANT_P (tem))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 678bd795014..a9f84c41def 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,120 @@
+2013-02-22 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56385
+ * gfortran.dg/proc_ptr_comp_37.f90: New.
+
+2013-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ Backport from mainline:
+ 2012-06-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/clearcapv2.map: New file.
+ * gcc.target/i386/i386.exp: Try it first before clearcap.map.
+
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56350
+ * gcc.dg/pr56350.c: New test.
+
+ 2013-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56250
+ * gcc.c-torture/execute/pr56250.c: New test.
+
+ 2013-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56241
+ * g++.dg/parse/crash61.C: New test.
+
+ PR c++/56239
+ * g++.dg/parse/pr56239.C: New test.
+
+ PR c++/56237
+ * g++.dg/abi/mangle61.C: New test.
+
+ 2013-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56217
+ * g++.dg/gomp/pr56217.C: New test.
+
+ 2012-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55110
+ * gcc.dg/pr55110.c: New test.
+
+2013-02-18 Richard Biener <rguenther@suse.de>
+
+ Revert
+ 2013-02-04 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53844
+ * g++.dg/tree-ssa/pr53844.C: New testcase.
+
+2013-02-17 Tobias Burnus <burnus@net-b.de>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ Backport from trunk
+ 2013-01-28 Tobias Burnus <burnus@net-b.de>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/53537
+ * gfortran.dg/import2.f90: Adjust undeclared type error messages.
+ * gfortran.dg/import8.f90: Likewise.
+ * gfortran.dg/interface_derived_type_1.f90: Likewise.
+ * gfortran.dg/import10.f90: New test.
+ * gfortran.dg/import11.f90: Likewise
+
+2013-02-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56318
+ * gcc/testsuite/gfortran.dg/matmul_9.f90: New.
+
+2012-02-13 Tobias Burnus <burnus@net-b.de>
+
+ Backport from mainline
+ 2012-01-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR fortran/55852
+ * gfortran.dg/intrinsic_size_3.f90: Make scan-tree-dump-times
+ number matching more robust.
+
+2013-02-11 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2013-02-11 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/56275
+ * gcc.dg/pr56275.c: New test.
+
+2013-02-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2013-02-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/56043
+ * gcc.target/powerpc/vsx-mass-1.c: Only run this test on
+ powerpc*-*-linux*.
+
+2013-02-05 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-12-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55107
+ * gcc.dg/torture/pr55107.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-pre-5.c: Adjust.
+
+2013-02-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54767
+ * gfortran.fortran-torture/execute/pr54767.f90: New testcase.
+
2013-02-04 Janis Johnson <janisjo@codesourcery.com>
PR testsuite/56206
@@ -13,7 +130,7 @@
* gcc.dg/pr44061.c: New testcase.
2013-01-08 Jakub Jelinek <jakub@redhat.com>
-
+
PR middle-end/55890
* gcc.dg/torture/pr55890-3.c: New test.
diff --git a/gcc/testsuite/g++.dg/abi/mangle61.C b/gcc/testsuite/g++.dg/abi/mangle61.C
new file mode 100644
index 00000000000..2ae336e42a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/mangle61.C
@@ -0,0 +1,28 @@
+// PR c++/56237
+// { dg-do compile }
+
+void *p[4];
+
+void
+foo ()
+{
+ static union { } u;
+ p[0] = &u;
+ {
+ static union { } u;
+ p[1] = &u;
+ {
+ static union { } u;
+ p[2] = &u;
+ }
+ }
+ {
+ static union { } u;
+ p[3] = &u;
+ }
+}
+
+// { dg-final { scan-assembler "_ZZ3foovE1u\[^_\]" } }
+// { dg-final { scan-assembler "_ZZ3foovE1u_0" } }
+// { dg-final { scan-assembler "_ZZ3foovE1u_1" } }
+// { dg-final { scan-assembler "_ZZ3foovE1u_2" } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C
new file mode 100644
index 00000000000..32cee969841
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C
@@ -0,0 +1,18 @@
+// PR c++/56291
+// { dg-options -std=c++11 }
+
+class Base
+{
+public:
+ constexpr Base() : v(1) {};
+ int v;
+};
+
+class Derived : public Base
+{
+public:
+ constexpr Derived() : Base() {};
+ virtual void function();
+};
+
+Derived d;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C
new file mode 100644
index 00000000000..d2457d6491c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C
@@ -0,0 +1,15 @@
+// PR c++/52026
+// { dg-options "-std=c++11 -O" }
+// { dg-do run }
+
+template<bool B>
+int func() {
+ const int constVal1 = B ? 100 : -100;
+ const int constVal = constVal1;
+ return [] { return constVal; }();
+}
+
+int main() {
+ if (func<true>() != 100)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C
new file mode 100644
index 00000000000..89e4e4babf5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C
@@ -0,0 +1,20 @@
+// PR c++/55710
+// { dg-do link { target c++11 } }
+
+template <class T>
+struct X {
+ static void (*code) ();
+};
+
+template <class T>
+void (*X<T>::code) () = []{}; // Line 7
+
+struct Y {
+ void (*code) () = []{} ; // Line 10
+ void operator()() { code(); }
+};
+
+int main () {
+ X<int>::code();
+ Y()();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C
new file mode 100644
index 00000000000..c1d010ba128
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C
@@ -0,0 +1,15 @@
+// PR c++/54276
+// { dg-do link { target c++11 } }
+
+template <typename T>
+void foo(T)
+{
+ static int x = 1;
+ auto f = [] { return x + 1; };
+ f();
+}
+
+int main()
+{
+ foo(4);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C
new file mode 100644
index 00000000000..6e25c331b45
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C
@@ -0,0 +1,11 @@
+// PR c++/54122
+// { dg-options -std=c++11 }
+
+enum E { F };
+
+template <typename A>
+struct C
+{
+ E e;
+ void f () { auto l = [&](void)->void { if (e == F) return; }; }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
new file mode 100644
index 00000000000..d7c5d2c051d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
@@ -0,0 +1,37 @@
+// PR c++/56135
+// { dg-do run { target c++11 } }
+
+#include <functional>
+
+struct test {
+ template<typename T>
+ std::function<void()> broken(int x) {
+ return [=] { +x; print<T>(); };
+ }
+
+ std::function<void()> works0() {
+ return [=] { print<int>(); };
+ }
+
+ template<typename T>
+ std::function<void()> works1() {
+ return [=] { print<int>(); };
+ }
+
+ template<typename T>
+ std::function<void()> works2() {
+ return [=] { this->print<T>(); };
+ }
+
+ template<typename T>
+ void print() { if (this == 0) __builtin_abort (); }
+};
+
+int main(void) {
+ test().broken<int>(1)();
+ test().works0()();
+ test().works1<int>()();
+ test().works2<int>()();
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C
new file mode 100644
index 00000000000..e1be1a0a771
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C
@@ -0,0 +1,19 @@
+// PR c++/56268
+// { dg-options -std=c++11 }
+
+template <class T>
+struct A {
+ A(const A&) noexcept (T::value);
+};
+
+struct B {
+ static const bool value = true;
+};
+
+template <class T>
+struct C {
+ static const bool value = __has_nothrow_copy (T);
+};
+
+#define SA(X) static_assert((X),#X)
+SA(C<A<B>>::value);
diff --git a/gcc/testsuite/g++.dg/gomp/pr56217.C b/gcc/testsuite/g++.dg/gomp/pr56217.C
new file mode 100644
index 00000000000..03dfc5f180b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr56217.C
@@ -0,0 +1,14 @@
+// PR middle-end/56217
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct S { int *p; S (); S (S &); };
+
+S
+foo ()
+{
+ S s;
+ #pragma omp task shared (s)
+ s.p = 0;
+ return s;
+}
diff --git a/gcc/testsuite/g++.dg/parse/crash61.C b/gcc/testsuite/g++.dg/parse/crash61.C
new file mode 100644
index 00000000000..790df0e4bc4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash61.C
@@ -0,0 +1,6 @@
+// PR c++/56241
+// { dg-do compile }
+
+struct pair { constexpr pair (const) : }; // { dg-error "" }
+template <0> make_pair () {} // { dg-error "" }
+pair prefix[] = { 0, make_pair } // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/parse/pr56239.C b/gcc/testsuite/g++.dg/parse/pr56239.C
new file mode 100644
index 00000000000..08f7f688938
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr56239.C
@@ -0,0 +1,13 @@
+// PR c++/56239
+// { dg-do compile }
+
+struct S
+{
+ int operator () () { return 0; }
+};
+
+int
+main ()
+{
+ return (S ()) ();
+}
diff --git a/gcc/testsuite/g++.dg/template/error49.C b/gcc/testsuite/g++.dg/template/error49.C
new file mode 100644
index 00000000000..57789a79aa9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error49.C
@@ -0,0 +1,10 @@
+// PR c++/40405
+
+template<int, int> struct A
+{
+ static int i;
+};
+
+template<int> int A<0,0>::i = 0; // { dg-error "" }
+
+int j = A<0,0>::i;
diff --git a/gcc/testsuite/g++.dg/template/ptrmem23.C b/gcc/testsuite/g++.dg/template/ptrmem23.C
new file mode 100644
index 00000000000..28c0a63e589
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem23.C
@@ -0,0 +1,22 @@
+// PR c++/56247
+
+struct Base {
+ void method() {}
+};
+
+typedef void (Base::*MemPtr)();
+
+// Template with a member function pointer "non-type parameter".
+template<MemPtr func>
+struct Wrapper {};
+
+template<class C>
+struct Child : public Base {
+ // Templated derived class instantiates the Wrapper with the same parameter
+ // in two different virtual methods.
+ void foo() { typedef Wrapper<&Base::method> W; }
+ void bar() { typedef Wrapper<&Base::method> W; }
+};
+
+// Instantiate Child with some type.
+template class Child<int>;
diff --git a/gcc/testsuite/g++.dg/template/typename19.C b/gcc/testsuite/g++.dg/template/typename19.C
new file mode 100644
index 00000000000..735deb27752
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typename19.C
@@ -0,0 +1,24 @@
+// PR c++/56395
+
+struct A
+{
+ template <class T> struct B { };
+};
+
+template <class T> struct D { };
+
+template <class T, class U> struct C
+{
+ typedef T _Type;
+ typedef typename T::template B<_Type> _BType;
+ D<_BType> d;
+};
+
+template <class T> struct C<T,T>
+{
+ typedef T _Type;
+ typedef typename T::template B<_Type> _BType;
+ D<_BType> d;
+};
+
+C<A,A> c;
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr53844.C b/gcc/testsuite/g++.dg/tree-ssa/pr53844.C
deleted file mode 100644
index 0be29d86cbf..00000000000
--- a/gcc/testsuite/g++.dg/tree-ssa/pr53844.C
+++ /dev/null
@@ -1,78 +0,0 @@
-// { dg-do compile }
-// { dg-options "-O2 -fdump-tree-optimized-vops" }
-
-struct VBase;
-
-//Very minimal numeric vector class where Base provides the policy
-template<typename Base=VBase>
-struct Vector : public Base{
-
- inline Vector(const Base& b)
- :Base(b)
- {
- }
-
- //Assignment from any other sort of Vector
- template<typename Base2>
- void operator= (const Vector<Base2>& from)
- {
- for(int i=0; i<100; i++){
- (*this)[i]=from[i];
- }
- }
-};
-
-
-//Base class to represent pointer as a Vector
-struct VBase{
- double * const my_data;
-
- double& operator[](int i) {
- return my_data[i];
- }
-
- const double& operator[](int i) const {
- return my_data[i];
- }
-};
-
-//Base class providing very minimalistic expression template
-template<class B2> struct ScalarMulExpr
-{
- const int& mul;
- const Vector<B2>& vec;
-
- int size() const
- {
- return vec.size();
- }
-
- double operator[](int i) const
- {
- return vec[i]*mul;
- }
-
- ScalarMulExpr(const Vector<B2>& vec_, const int& m)
- :mul(m),vec(vec_)
- {
- }
-};
-
-//Allow vector to be multiplied by a scalar
-template<class B2>
-Vector<ScalarMulExpr<B2> > operator*(const Vector<B2>& lhs, const int& rhs)
-{
- return ScalarMulExpr<B2>(lhs, rhs);
-}
-
-//Test function producing suboptimal asm code
-void test(const Vector<>& in, Vector<>& out, int i)
-{
- out=in*1*1*1*1*1*1*1*1*1*1*1;
-}
-
-// There should be a single store remaining, inside the loops. All
-// dead stores to unused temporaries should have been removed.
-
-// { dg-final { scan-tree-dump-times "VDEF" 1 "optimized" } }
-// { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56250.c b/gcc/testsuite/gcc.c-torture/execute/pr56250.c
new file mode 100644
index 00000000000..8da36f83a8e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56250.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/56250 */
+
+extern void abort (void);
+
+int
+main ()
+{
+ unsigned int x = 2;
+ unsigned int y = (0U - x / 2) / 2;
+ if (-1U / x != y)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr55110.c b/gcc/testsuite/gcc.dg/pr55110.c
new file mode 100644
index 00000000000..2a031a52908
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55110.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/55110 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-vectorize" } */
+
+int
+foo (int x)
+{
+ int a, b;
+ for (b = 0; b < 8; b++)
+ for (a = 0; a < 2; a++)
+ x /= 3;
+ return x;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c
new file mode 100644
index 00000000000..b901bb2b199
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56275.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+
+typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long))));
+
+void tiger_block_v2 (long long in1, v2tw *res)
+{
+ v2tw i1 = { in1, in1 };
+
+ *res = i1 << 1;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56350.c b/gcc/testsuite/gcc.dg/pr56350.c
new file mode 100644
index 00000000000..899a507ee8b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56350.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/56350 */
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vectorize" } */
+
+int a, b, c;
+
+void
+f (void)
+{
+ for (; c; c++)
+ for (b = 0; b < 2; b++)
+ a /= 8;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55107.c b/gcc/testsuite/gcc.dg/torture/pr55107.c
new file mode 100644
index 00000000000..2402716be30
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55107.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+
+typedef unsigned short uint16_t;
+
+uint16_t a, b;
+
+uint16_t f(void)
+{
+ int c, **p;
+ short d = 2, e = 4;
+
+ for (;; b++)
+ {
+ int *j, k = 0;
+
+ for (; *j; j++)
+ {
+ for(; c; c++)
+ for(; k < 1; k++)
+ {
+ short *f = &d;
+
+ if(b)
+ return *f;
+ }
+ }
+
+ if(!c)
+ d *= e;
+
+ ((a = d) ? b = 0 : (**p ? : 1) != (d != 1 ? : (a = 0))) != (k ? a : 0)
+ < (a *= c = k) && (**p = 0);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-5.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-5.c
index 8756944b960..d0e985f81a5 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-5.c
@@ -12,5 +12,6 @@ foo (int i)
}
/* We should detect that a+b is the same along both edges, and replace it with
5 */
-/* { dg-final { scan-tree-dump-times "Constified: 1" 1 "pre"} } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre"} } */
+/* { dg-final { scan-tree-dump-times "Insertions" 0 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.target/i386/clearcapv2.map b/gcc/testsuite/gcc.target/i386/clearcapv2.map
new file mode 100644
index 00000000000..95cb14cc5d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/clearcapv2.map
@@ -0,0 +1,7 @@
+# clear all hardware capabilities emitted by Sun as: the tests here
+# guard against execution at runtime
+# uses mapfile v2 syntax which is the only way to clear AT_SUN_CAP_HW2 flags
+$mapfile_version 2
+CAPABILITY {
+ HW = ;
+};
diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp
index 75bea9be806..b8bbe1c74f2 100644
--- a/gcc/testsuite/gcc.target/i386/i386.exp
+++ b/gcc/testsuite/gcc.target/i386/i386.exp
@@ -245,12 +245,23 @@ proc check_effective_target_bmi2 { } {
# If the linker used understands -M <mapfile>, pass it to clear hardware
# capabilities set by the Sun assembler.
-set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
+# Try mapfile syntax v2 first which is the only way to clear hwcap_2 flags.
+set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcapv2.map"
-if [check_no_compiler_messages mapfile executable {
+if ![check_no_compiler_messages mapfilev2 executable {
+ int main (void) { return 0; }
+} $clearcap_ldflags ] {
+ # If this doesn't work, fall back to the less capable v1 syntax.
+ set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
+
+ if ![check_no_compiler_messages mapfile executable {
int main (void) { return 0; }
- } $clearcap_ldflags ] {
+ } $clearcap_ldflags ] {
+ unset clearcap_ldflags
+ }
+}
+if [info exists clearcap_ldflags] {
if { [info procs gcc_target_compile] != [list] \
&& [info procs saved_gcc_target_compile] == [list] } {
rename gcc_target_compile saved_gcc_target_compile
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c b/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c
index 445dc1992d9..8f4062be7b7 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O3 -ftree-vectorize -mcpu=power7 -ffast-math -mveclibabi=mass" } */
diff --git a/gcc/testsuite/gfortran.dg/import10.f90 b/gcc/testsuite/gfortran.dg/import10.f90
new file mode 100644
index 00000000000..dbe630a48a6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/import10.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR fortran/53537
+! The use of WP in the ODE_DERIVATIVE interface used to be rejected because
+! the symbol was imported under the original name DP.
+!
+! Original test case from Arjen Markus <arjen.markus@deltares.nl>
+
+module select_precision
+ integer, parameter :: dp = kind(1.0)
+end module select_precision
+
+module ode_types
+ use select_precision, only: wp => dp
+ implicit none
+ interface
+ subroutine ode_derivative(x)
+ import :: wp
+ real(wp) :: x
+ end subroutine ode_derivative
+ end interface
+end module ode_types
+
+
diff --git a/gcc/testsuite/gfortran.dg/import11.f90 b/gcc/testsuite/gfortran.dg/import11.f90
new file mode 100644
index 00000000000..f2ac514543d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/import11.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR fortran/53537
+! The definition of T1 in the interface used to be rejected because T3
+! was imported under the original name T1.
+
+ MODULE MOD
+ TYPE T1
+ SEQUENCE
+ integer :: j
+ END TYPE t1
+ END
+ PROGRAM MAIN
+ USE MOD, T3 => T1
+ INTERFACE SUBR
+ SUBROUTINE SUBR1(X,y)
+ IMPORT :: T3
+ type t1
+! sequence
+! integer :: i
+ end type t1
+ TYPE(T3) X
+! TYPE(T1) X
+ END SUBROUTINE
+ END INTERFACE SUBR
+ END PROGRAM MAIN
+
+
diff --git a/gcc/testsuite/gfortran.dg/import2.f90 b/gcc/testsuite/gfortran.dg/import2.f90
index 4a0128a0bf1..0f380b7b3fc 100644
--- a/gcc/testsuite/gfortran.dg/import2.f90
+++ b/gcc/testsuite/gfortran.dg/import2.f90
@@ -37,7 +37,7 @@ module testmod
interface
subroutine other(x,y)
import ! { dg-error "Fortran 2003: IMPORT statement" }
- type(modType) :: y ! { dg-error "not been declared within the interface" }
+ type(modType) :: y ! { dg-error "is being used before it is defined" }
real(kind) :: x ! { dg-error "has not been declared" }
end subroutine
end interface
@@ -56,13 +56,13 @@ program foo
interface
subroutine bar(x,y)
import ! { dg-error "Fortran 2003: IMPORT statement" }
- type(myType) :: x ! { dg-error "not been declared within the interface" }
+ type(myType) :: x ! { dg-error "is being used before it is defined" }
integer(dp) :: y ! { dg-error "has not been declared" }
end subroutine bar
subroutine test(x)
import :: myType3 ! { dg-error "Fortran 2003: IMPORT statement" }
import myType3 ! { dg-error "Fortran 2003: IMPORT statement" }
- type(myType3) :: x ! { dg-error "not been declared within the interface" }
+ type(myType3) :: x ! { dg-error "is being used before it is defined" }
end subroutine test
end interface
diff --git a/gcc/testsuite/gfortran.dg/import8.f90 b/gcc/testsuite/gfortran.dg/import8.f90
index 0d88e625b81..543b0a1d0fa 100644
--- a/gcc/testsuite/gfortran.dg/import8.f90
+++ b/gcc/testsuite/gfortran.dg/import8.f90
@@ -12,7 +12,7 @@ end type Connection
abstract interface
subroutine generic_desc(self)
! <<< missing IMPORT
- class(Connection) :: self ! { dg-error "has not been declared within the interface" }
+ class(Connection) :: self ! { dg-error "is being used before it is defined" }
end subroutine generic_desc
end interface
end
diff --git a/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90 b/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
index a2c4d02bee3..710fcff9cd2 100644
--- a/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
+++ b/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
@@ -13,7 +13,7 @@ contains
subroutine sim_1(func1,params)
interface
function func1(fparams)
- type(fcnparms) :: fparams ! { dg-error "not been declared within the interface" }
+ type(fcnparms) :: fparams ! { dg-error "is being used before it is defined" }
real :: func1
end function func1
end interface
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_size_3.f90 b/gcc/testsuite/gfortran.dg/intrinsic_size_3.f90
index d5f4bd23d55..5856509bf59 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_size_3.f90
+++ b/gcc/testsuite/gfortran.dg/intrinsic_size_3.f90
@@ -22,5 +22,5 @@ program bug
stop
end program bug
-! { dg-final { scan-tree-dump-times "iszs = \\(integer\\(kind=2\\)\\) MAX_EXPR <\\(D.....->dim.0..ubound - D.....->dim.0..lbound\\) \\+ 1, 0>;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "iszs = \\(integer\\(kind=2\\)\\) MAX_EXPR <\\(D.\[0-9\]+->dim.0..ubound - D.\[0-9\]+->dim.0..lbound\\) \\+ 1, 0>;" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/matmul_9.f90 b/gcc/testsuite/gfortran.dg/matmul_9.f90
new file mode 100644
index 00000000000..bf2a299c821
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/matmul_9.f90
@@ -0,0 +1,47 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/56318
+!
+! Contributed by Alberto Luaces
+!
+SUBROUTINE mass_matrix
+ DOUBLE PRECISION,PARAMETER::m1=1.d0
+ DOUBLE PRECISION,DIMENSION(3,2),PARAMETER::A1=reshape([1.d0,0.d0, 0.d0, &
+ 0.d0,1.d0, 0.d0],[3,2])
+ DOUBLE PRECISION,DIMENSION(2,2),PARAMETER::Mel=reshape([1.d0/3.d0, 0.d0, &
+ 0.d0, 1.d0/3.d0],[2,2])
+
+ DOUBLE PRECISION,DIMENSION(3,3)::MM1
+
+ MM1=m1*matmul(A1,matmul(Mel,transpose(A1)))
+ !print '(3f8.3)', MM1
+ if (any (abs (MM1 &
+ - reshape ([1.d0/3.d0, 0.d0, 0.d0, &
+ 0.d0, 1.d0/3.d0, 0.d0, &
+ 0.d0, 0.d0, 0.d0], &
+ [3,3])) > epsilon(1.0d0))) &
+ call abort ()
+END SUBROUTINE mass_matrix
+
+program name
+ implicit none
+ integer, parameter :: A(3,2) = reshape([1,2,3,4,5,6],[3,2])
+ integer, parameter :: B(2,3) = reshape([3,17,23,31,43,71],[2,3])
+ integer, parameter :: C(3) = [-5,-7,-21]
+ integer, parameter :: m1 = 1
+
+! print *, matmul(B,C)
+ if (any (matmul(B,C) /= [-1079, -1793])) call abort()
+! print *, matmul(C,A)
+ if (any (matmul(C,A) /= [-82, -181])) call abort()
+! print '(3i5)', m1*matmul(A,B)
+ if (any (m1*matmul(A,B) /= reshape([71,91,111, 147,201,255, 327,441,555],&
+ [3,3]))) &
+ call abort()
+ call mass_matrix
+end program name
+
+! { dg-final { scan-tree-dump-times "matmul" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_37.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_37.f90
new file mode 100644
index 00000000000..9695b96066c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_37.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+!
+! PR 56385: [4.6/4.7/4.8 Regression] [OOP] ICE with allocatable function result in a procedure-pointer component
+!
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
+
+ implicit none
+
+ type :: TGeometricShape
+ end type
+
+ type :: TVolumeSourceBody
+ class(TGeometricShape), allocatable :: GeometricShape
+ procedure(scalar_flux_interface), pointer :: get_scalar_flux
+ end type
+
+ abstract interface
+ function scalar_flux_interface(self) result(res)
+ import
+ real, allocatable :: res(:)
+ class(TVolumeSourceBody), intent(in) :: self
+ end function
+ end interface
+
+end
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/pr54767.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/pr54767.f90
new file mode 100644
index 00000000000..f95bff1b338
--- /dev/null
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/pr54767.f90
@@ -0,0 +1,31 @@
+SUBROUTINE XXX (IL, IU)
+ implicit none
+ integer, INTENT(IN) :: IL, IU
+
+ integer :: NXX (14) = (/ 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14 /)
+ integer :: ivvv, ia, ja, iaii
+ logical :: qop
+
+ QOP=.FALSE.
+
+ DO IA=IL,IU
+ JA=NXX(IA)
+ IF (.NOT. QOP .and. JA.GT.0) THEN
+ IAII=IA
+ QOP=.TRUE.
+ ENDIF
+
+ IF (QOP) THEN
+ ivvv=IA-IAII+1 ! mis-compiled
+ ENDIF
+ ENDDO
+
+ IF (ivvv.NE.2) THEN
+ call abort
+ ENDIF
+END subroutine
+
+program p
+ implicit none
+ CALL XXX (1, 3)
+end
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index c80d9c9b74a..285d08c66c6 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -94,7 +94,7 @@ dse_possible_dead_store_p (gimple stmt, gimple *use_stmt)
temp = stmt;
do
{
- gimple use_stmt, defvar_def;
+ gimple use_stmt;
imm_use_iterator ui;
bool fail = false;
tree defvar;
@@ -108,7 +108,6 @@ dse_possible_dead_store_p (gimple stmt, gimple *use_stmt)
defvar = PHI_RESULT (temp);
else
defvar = gimple_vdef (temp);
- defvar_def = temp;
temp = NULL;
FOR_EACH_IMM_USE_STMT (use_stmt, ui, defvar)
{
@@ -140,14 +139,7 @@ dse_possible_dead_store_p (gimple stmt, gimple *use_stmt)
fail = true;
BREAK_FROM_IMM_USE_STMT (ui);
}
- /* Do not consider the PHI as use if it dominates the
- stmt defining the virtual operand we are processing,
- we have processed it already in this case. */
- if (gimple_bb (defvar_def) != gimple_bb (use_stmt)
- && !dominated_by_p (CDI_DOMINATORS,
- gimple_bb (defvar_def),
- gimple_bb (use_stmt)))
- temp = use_stmt;
+ temp = use_stmt;
}
/* If the statement is a use the store is not dead. */
else if (ref_maybe_used_by_stmt_p (use_stmt,
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 24d4bcd4b42..01922864c0f 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -448,10 +448,6 @@ static struct
/* The number of new PHI nodes added by PRE. */
int phis;
-
- /* The number of values found constant. */
- int constified;
-
} pre_stats;
static bool do_partial_partial;
@@ -862,6 +858,8 @@ bitmap_set_replace_value (bitmap_set_t set, unsigned int lookfor,
return;
}
}
+
+ gcc_unreachable ();
}
/* Return true if two bitmap sets are equal. */
@@ -3105,7 +3103,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
break;
case 3:
folded = fold_build3 (nary->opcode, nary->type,
- genop[0], genop[1], genop[3]);
+ genop[0], genop[1], genop[2]);
break;
default:
gcc_unreachable ();
@@ -3511,7 +3509,8 @@ do_regular_insertion (basic_block block, basic_block dom)
FOR_EACH_VEC_ELT (pre_expr, exprs, i, expr)
{
- if (expr->kind != NAME)
+ if (expr->kind == NARY
+ || expr->kind == REFERENCE)
{
pre_expr *avail;
unsigned int val;
@@ -3612,36 +3611,36 @@ do_regular_insertion (basic_block block, basic_block dom)
/* If all edges produce the same value and that value is
an invariant, then the PHI has the same value on all
edges. Note this. */
- else if (!cant_insert && all_same && eprime
- && (edoubleprime->kind == CONSTANT
- || edoubleprime->kind == NAME)
- && !value_id_constant_p (val))
+ else if (!cant_insert && all_same)
{
- unsigned int j;
- bitmap_iterator bi;
- bitmap_set_t exprset = VEC_index (bitmap_set_t,
- value_expressions, val);
+ tree exprtype = get_expr_type (expr);
+ tree temp;
+ gimple assign;
+ pre_expr newe;
+ gimple_stmt_iterator gsi;
- unsigned int new_val = get_expr_value_id (edoubleprime);
- FOR_EACH_EXPR_ID_IN_SET (exprset, j, bi)
- {
- pre_expr expr = expression_for_id (j);
+ gcc_assert (edoubleprime->kind == CONSTANT
+ || edoubleprime->kind == NAME);
- if (expr->kind == NAME)
- {
- vn_ssa_aux_t info = VN_INFO (PRE_EXPR_NAME (expr));
- /* Just reset the value id and valnum so it is
- the same as the constant we have discovered. */
- if (edoubleprime->kind == CONSTANT)
- {
- info->valnum = PRE_EXPR_CONSTANT (edoubleprime);
- pre_stats.constified++;
- }
- else
- info->valnum = VN_INFO (PRE_EXPR_NAME (edoubleprime))->valnum;
- info->value_id = new_val;
- }
+ if (!pretemp || TREE_TYPE (pretemp) != exprtype)
+ {
+ pretemp = create_tmp_reg (exprtype, "pretmp");
+ add_referenced_var (pretemp);
}
+ temp = make_ssa_name (pretemp, NULL);
+ assign = gimple_build_assign (temp,
+ edoubleprime->kind == CONSTANT ? PRE_EXPR_CONSTANT (edoubleprime) : PRE_EXPR_NAME (edoubleprime));
+ gsi = gsi_after_labels (block);
+ gsi_insert_before (&gsi, assign, GSI_NEW_STMT);
+
+ gimple_set_plf (assign, NECESSARY, false);
+ VN_INFO_GET (temp)->value_id = val;
+ VN_INFO (temp)->valnum = temp;
+ bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (temp));
+ newe = get_or_alloc_expr_for_name (temp);
+ add_to_value (val, newe);
+ bitmap_value_replace_in_set (AVAIL_OUT (block), newe);
+ bitmap_insert_into_set (NEW_SETS (block), newe);
}
free (avail);
}
@@ -3669,7 +3668,8 @@ do_partial_partial_insertion (basic_block block, basic_block dom)
FOR_EACH_VEC_ELT (pre_expr, exprs, i, expr)
{
- if (expr->kind != NAME)
+ if (expr->kind == NARY
+ || expr->kind == REFERENCE)
{
pre_expr *avail;
unsigned int val;
@@ -4958,7 +4958,6 @@ execute_pre (bool do_fre)
statistics_counter_event (cfun, "PA inserted", pre_stats.pa_insert);
statistics_counter_event (cfun, "New PHIs", pre_stats.phis);
statistics_counter_event (cfun, "Eliminated", pre_stats.eliminations);
- statistics_counter_event (cfun, "Constified", pre_stats.constified);
clear_expression_ids ();
if (!do_fre)
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 352a01a71ac..a6aa8e0ec4a 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -4453,7 +4453,6 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
if (orig_stmt)
{
orig_stmt_info = vinfo_for_stmt (orig_stmt);
- gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
gcc_assert (STMT_VINFO_IN_PATTERN_P (orig_stmt_info));
gcc_assert (!STMT_VINFO_IN_PATTERN_P (stmt_info));
}
@@ -4523,7 +4522,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
The last use is the reduction variable. In case of nested cycle this
assumption is not true: we use reduc_index to record the index of the
reduction variable. */
- for (i = 0; i < op_type-1; i++)
+ for (i = 0; i < op_type - 1; i++)
{
/* The condition of COND_EXPR is checked in vectorizable_condition(). */
if (i == 0 && code == COND_EXPR)
@@ -4555,11 +4554,18 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
if (!vectype_in)
vectype_in = tem;
gcc_assert (is_simple_use);
- gcc_assert (dt == vect_reduction_def
- || dt == vect_nested_cycle
- || ((dt == vect_internal_def || dt == vect_external_def
- || dt == vect_constant_def || dt == vect_induction_def)
- && nested_cycle && found_nested_cycle_def));
+ if (!(dt == vect_reduction_def
+ || dt == vect_nested_cycle
+ || ((dt == vect_internal_def || dt == vect_external_def
+ || dt == vect_constant_def || dt == vect_induction_def)
+ && nested_cycle && found_nested_cycle_def)))
+ {
+ /* For pattern recognized stmts, orig_stmt might be a reduction,
+ but some helper statements for the pattern might not, or
+ might be COND_EXPRs with reduction uses in the condition. */
+ gcc_assert (orig_stmt);
+ return false;
+ }
if (!found_nested_cycle_def)
reduc_def_stmt = def_stmt;
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 149626310d4..a65266c27fa 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -6620,6 +6620,20 @@ vrp_visit_phi_node (gimple phi)
if (TREE_CODE (arg) == SSA_NAME)
{
vr_arg = *(get_value_range (arg));
+ /* Do not allow equivalences or symbolic ranges to leak in from
+ backedges. That creates invalid equivalencies. */
+ if (e->flags & EDGE_DFS_BACK
+ && (vr_arg.type == VR_RANGE
+ || vr_arg.type == VR_ANTI_RANGE))
+ {
+ vr_arg.equiv = NULL;
+ if (symbolic_range_p (&vr_arg))
+ {
+ vr_arg.type = VR_VARYING;
+ vr_arg.min = NULL_TREE;
+ vr_arg.max = NULL_TREE;
+ }
+ }
}
else
{
@@ -7871,6 +7885,9 @@ execute_vrp (void)
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
scev_initialize ();
+ /* ??? This ends up using stale EDGE_DFS_BACK for liveness computation.
+ Inserting assertions may split edges which will invalidate
+ EDGE_DFS_BACK. */
insert_range_assertions ();
/* Estimate number of iterations - but do not use undefined behavior
@@ -7883,6 +7900,9 @@ execute_vrp (void)
to_update_switch_stmts = VEC_alloc (switch_update, heap, 5);
threadedge_initialize_values ();
+ /* For visiting PHI nodes we need EDGE_DFS_BACK computed. */
+ mark_dfs_back_edges ();
+
vrp_initialize ();
ssa_propagate (vrp_visit_stmt, vrp_visit_phi_node);
vrp_finalize ();
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index d05c814091f..d797c40cdc5 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -8980,31 +8980,34 @@ vt_add_function_parameter (tree parm)
/* DECL_INCOMING_RTL uses the INCOMING_REGNO of parameter registers.
If the target machine has an explicit window save instruction, the
actual entry value is the corresponding OUTGOING_REGNO instead. */
- if (REG_P (incoming)
- && HARD_REGISTER_P (incoming)
- && OUTGOING_REGNO (REGNO (incoming)) != REGNO (incoming))
+ if (HAVE_window_save && !current_function_uses_only_leaf_regs)
{
- parm_reg_t *p
- = VEC_safe_push (parm_reg_t, gc, windowed_parm_regs, NULL);
- p->incoming = incoming;
- incoming
- = gen_rtx_REG_offset (incoming, GET_MODE (incoming),
- OUTGOING_REGNO (REGNO (incoming)), 0);
- p->outgoing = incoming;
- }
- else if (MEM_P (incoming)
- && REG_P (XEXP (incoming, 0))
- && HARD_REGISTER_P (XEXP (incoming, 0)))
- {
- rtx reg = XEXP (incoming, 0);
- if (OUTGOING_REGNO (REGNO (reg)) != REGNO (reg))
+ if (REG_P (incoming)
+ && HARD_REGISTER_P (incoming)
+ && OUTGOING_REGNO (REGNO (incoming)) != REGNO (incoming))
{
parm_reg_t *p
= VEC_safe_push (parm_reg_t, gc, windowed_parm_regs, NULL);
- p->incoming = reg;
- reg = gen_raw_REG (GET_MODE (reg), OUTGOING_REGNO (REGNO (reg)));
- p->outgoing = reg;
- incoming = replace_equiv_address_nv (incoming, reg);
+ p->incoming = incoming;
+ incoming
+ = gen_rtx_REG_offset (incoming, GET_MODE (incoming),
+ OUTGOING_REGNO (REGNO (incoming)), 0);
+ p->outgoing = incoming;
+ }
+ else if (MEM_P (incoming)
+ && REG_P (XEXP (incoming, 0))
+ && HARD_REGISTER_P (XEXP (incoming, 0)))
+ {
+ rtx reg = XEXP (incoming, 0);
+ if (OUTGOING_REGNO (REGNO (reg)) != REGNO (reg))
+ {
+ parm_reg_t *p
+ = VEC_safe_push (parm_reg_t, gc, windowed_parm_regs, NULL);
+ p->incoming = reg;
+ reg = gen_raw_REG (GET_MODE (reg), OUTGOING_REGNO (REGNO (reg)));
+ p->outgoing = reg;
+ incoming = replace_equiv_address_nv (incoming, reg);
+ }
}
}
#endif
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 6fec9657929..27b0aac179a 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -1,3 +1,9 @@
+2013-02-13 Kai Tietz <ktietz@redhat.com>
+
+ PR target/52122
+ * Makefile.in (LN_S_RECURSIVE): New.
+ (adainclude, adalib): Use LN_S_RECURSIVE for copy.
+
2012-09-20 Release Manager
* GCC 4.7.2 released.
diff --git a/libada/Makefile.in b/libada/Makefile.in
index 389a2fb2f79..68c846fe94e 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -43,6 +43,12 @@ enable_shared = @enable_shared@
LN_S=@LN_S@
AWK=@AWK@
+ifeq (cp -p,$(LN_S))
+LN_S_RECURSIVE = cp -pR
+else
+LN_S_RECURSIVE = $(LN_S)
+endif
+
# Variables for the user (or the top level) to override.
objext=.o
THREAD_KIND=native
@@ -100,8 +106,8 @@ gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile
&& touch stamp-libada
-rm -rf adainclude
-rm -rf adalib
- $(LN_S) $(ADA_RTS_DIR) adainclude
- $(LN_S) $(ADA_RTS_DIR) adalib
+ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude
+ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib
gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
test -f stamp-libada || \
@@ -109,8 +115,8 @@ gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
&& touch stamp-libada
-rm -rf adainclude
-rm -rf adalib
- $(LN_S) $(ADA_RTS_DIR) adainclude
- $(LN_S) $(ADA_RTS_DIR) adalib
+ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude
+ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib
osconstool:
$(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog
index 4d6aad8217d..018837c5c86 100644
--- a/libcpp/po/ChangeLog
+++ b/libcpp/po/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-05 Joseph Myers <joseph@codesourcery.com>
+
+ * eo.po: New.
+
2012-09-26 Joseph Myers <joseph@codesourcery.com>
* sv.po: Update.
diff --git a/libcpp/po/eo.po b/libcpp/po/eo.po
new file mode 100644
index 00000000000..601ff2d57c4
--- /dev/null
+++ b/libcpp/po/eo.po
@@ -0,0 +1,955 @@
+# Translation of cpplib to Esperanto
+# Copyright (C) 2013 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gcc package.
+# Felipe Castro <fefcas@gmail.com>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cpplib 4.7.2\n"
+"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
+"POT-Creation-Date: 2012-01-27 16:12+0000\n"
+"PO-Revision-Date: 2013-02-05 16:18-0300\n"
+"Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
+"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
+"Language: eo\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: charset.c:674
+#, c-format
+msgid "conversion from %s to %s not supported by iconv"
+msgstr "Konverto de %s al %s ne estas subtenata de iconv"
+
+#: charset.c:677
+msgid "iconv_open"
+msgstr "iconv_open"
+
+#: charset.c:685
+#, c-format
+msgid "no iconv implementation, cannot convert from %s to %s"
+msgstr "neniu realigo de iconv, ne eblas konverti de %s al %s"
+
+#: charset.c:781
+#, c-format
+msgid "character 0x%lx is not in the basic source character set\n"
+msgstr "la signo 0x%lx ne estas en la baza fonta signaro\n"
+
+#: charset.c:798 charset.c:1444
+msgid "converting to execution character set"
+msgstr "konverto al plenumiga signaro"
+
+#: charset.c:804
+#, c-format
+msgid "character 0x%lx is not unibyte in execution character set"
+msgstr "la signo 0x%lx ne estas unubajta en plenumiga signaro"
+
+#: charset.c:928
+#, c-format
+msgid "Character %x might not be NFKC"
+msgstr "La signo %x povas ne esti NFKC"
+
+#: charset.c:994
+msgid "universal character names are only valid in C++ and C99"
+msgstr "universalaj signo-nomoj nur validas en C++ kaj C99"
+
+#: charset.c:997
+#, c-format
+msgid "the meaning of '\\%c' is different in traditional C"
+msgstr "la signifo de '\\%c' estas malsama en tradicia C"
+
+#: charset.c:1006
+msgid "In _cpp_valid_ucn but not a UCN"
+msgstr "En _cpp_valid_ucn sed ne estas UCN"
+
+#: charset.c:1031
+#, c-format
+msgid "incomplete universal character name %.*s"
+msgstr "nekompleta universala signo-nomo %.*s"
+
+#: charset.c:1046
+#, c-format
+msgid "%.*s is not a valid universal character"
+msgstr "%.*s ne estas valida universala signo"
+
+#: charset.c:1056 lex.c:1052
+msgid "'$' in identifier or number"
+msgstr "'$' en identiganto aŭ numero"
+
+#: charset.c:1066
+#, c-format
+msgid "universal character %.*s is not valid in an identifier"
+msgstr "la universala signo %.*s ne estas valida en identiganto"
+
+#: charset.c:1070
+#, c-format
+msgid "universal character %.*s is not valid at the start of an identifier"
+msgstr "la universala signo %.*s ne estas valida en komenco de identiganto"
+
+#: charset.c:1102 charset.c:1674
+msgid "converting UCN to source character set"
+msgstr "konverto de UCN al la fonta signaro"
+
+#: charset.c:1106
+msgid "converting UCN to execution character set"
+msgstr "konverto de UCN al la plenumiga signaro"
+
+#: charset.c:1178
+msgid "the meaning of '\\x' is different in traditional C"
+msgstr "la signifo de '\\x' estas malsama en tradicia C"
+
+#: charset.c:1195
+msgid "\\x used with no following hex digits"
+msgstr "\\x estis uzata kun la jenaj deksesumaj ciferoj"
+
+#: charset.c:1202
+msgid "hex escape sequence out of range"
+msgstr "deksesuma eskapa sekvo estas for de intervalo"
+
+#: charset.c:1240
+msgid "octal escape sequence out of range"
+msgstr "okuma eskapa sekvo estas for de intervalo"
+
+#: charset.c:1306
+msgid "the meaning of '\\a' is different in traditional C"
+msgstr "la signifo de '\\a' estas malsama en tradicia C"
+
+#: charset.c:1313
+#, c-format
+msgid "non-ISO-standard escape sequence, '\\%c'"
+msgstr "ne-ISO-norma eskapa sekvo, '\\%c'"
+
+#: charset.c:1321
+#, c-format
+msgid "unknown escape sequence: '\\%c'"
+msgstr "nekonata eskapa sekvo: '\\%c'"
+
+#: charset.c:1329
+#, c-format
+msgid "unknown escape sequence: '\\%s'"
+msgstr "nekonata eskapa sekvo: '\\%s'"
+
+#: charset.c:1336
+msgid "converting escape sequence to execution character set"
+msgstr "konverto de eskapa sekvo al plenumiga signaro"
+
+#: charset.c:1509 charset.c:1573
+msgid "character constant too long for its type"
+msgstr "signa konstanto tro longas por ties tipo"
+
+#: charset.c:1512
+msgid "multi-character character constant"
+msgstr "plursigna signa konstanto"
+
+#: charset.c:1612
+msgid "empty character constant"
+msgstr "malplena signa konstanto"
+
+#: charset.c:1721
+#, c-format
+msgid "failure to convert %s to %s"
+msgstr "problemo por konverti %s al %s"
+
+#: directives.c:223 directives.c:249
+#, c-format
+msgid "extra tokens at end of #%s directive"
+msgstr "kromaj ĵetonoj ĉe la fino de la instrukcio #%s"
+
+#: directives.c:356
+#, c-format
+msgid "#%s is a GCC extension"
+msgstr "#%s estas aldono de GCC"
+
+#: directives.c:361
+#, c-format
+msgid "#%s is a deprecated GCC extension"
+msgstr "#%s estas evitinda aldono de GCC"
+
+#: directives.c:374
+msgid "suggest not using #elif in traditional C"
+msgstr "sugesti ne uzi #elif en tradicia C"
+
+#: directives.c:377
+#, c-format
+msgid "traditional C ignores #%s with the # indented"
+msgstr "tradicia C preteratentas #%s kun la # krommarĝenita"
+
+#: directives.c:381
+#, c-format
+msgid "suggest hiding #%s from traditional C with an indented #"
+msgstr "sugesti kaŝi #%s el tradicia C per krommarĝenigo de #"
+
+#: directives.c:407
+msgid "embedding a directive within macro arguments is not portable"
+msgstr "enkorpigi instrukcion ene de makroaj argumentoj ne estas portebla"
+
+#: directives.c:427
+msgid "style of line directive is a GCC extension"
+msgstr "stilo de lini-instrukcioj estas aldono de GCC"
+
+#: directives.c:482
+#, c-format
+msgid "invalid preprocessing directive #%s"
+msgstr "malvalida antaŭproceza instrukcio #%s"
+
+#: directives.c:550
+msgid "\"defined\" cannot be used as a macro name"
+msgstr "\"defined\" ne povas estis uzata kiel makroa nomo"
+
+#: directives.c:556
+#, c-format
+msgid "\"%s\" cannot be used as a macro name as it is an operator in C++"
+msgstr "\"%s\" ne povas esti uzata kiel makroa nomo ĉar ĝi estas operatoro en C++"
+
+#: directives.c:559
+#, c-format
+msgid "no macro name given in #%s directive"
+msgstr "neniu makroa nomo estas indikita en la instrukcio #%s"
+
+#: directives.c:562
+msgid "macro names must be identifiers"
+msgstr "makroaj nomoj devas esti identigantoj"
+
+#: directives.c:611
+#, c-format
+msgid "undefining \"%s\""
+msgstr "ni maldifinas \"%s\""
+
+#: directives.c:666
+msgid "missing terminating > character"
+msgstr "mankas finiganta signo >"
+
+#: directives.c:725
+#, c-format
+msgid "#%s expects \"FILENAME\" or <FILENAME>"
+msgstr "#%s atendas \"DOSIERNOMO\" aŭ <DOSIERNOMO>"
+
+#: directives.c:771
+#, c-format
+msgid "empty filename in #%s"
+msgstr "malplena dosiernomo en #%s"
+
+#: directives.c:781
+msgid "#include nested too deeply"
+msgstr "#include estas ingita tro profunde"
+
+#: directives.c:822
+msgid "#include_next in primary source file"
+msgstr "#include_next en ĉefa fonta dosiero"
+
+#: directives.c:848
+#, c-format
+msgid "invalid flag \"%s\" in line directive"
+msgstr "malvalida flago \"%s\" en lini-instrukcio"
+
+#: directives.c:908
+msgid "unexpected end of file after #line"
+msgstr "neatendita dosierfino post #line"
+
+#: directives.c:911
+#, c-format
+msgid "\"%s\" after #line is not a positive integer"
+msgstr "\"%s\" post #line ne estas pozitiva entjero"
+
+#: directives.c:917 directives.c:919
+msgid "line number out of range"
+msgstr "lininumero estas for de intervalo"
+
+#: directives.c:932 directives.c:1012
+#, c-format
+msgid "\"%s\" is not a valid filename"
+msgstr "\"%s\" ne estas valida dosiernomo"
+
+#: directives.c:972
+#, c-format
+msgid "\"%s\" after # is not a positive integer"
+msgstr "\"%s\" post # ne estas pozitiva entjero"
+
+#: directives.c:1067 directives.c:1069 directives.c:1071
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: directives.c:1095
+#, c-format
+msgid "invalid #%s directive"
+msgstr "malvalida instrukcio #%s"
+
+#: directives.c:1158
+#, c-format
+msgid "registering pragmas in namespace \"%s\" with mismatched name expansion"
+msgstr "registro de pragma en nomspaco \"%s\" kun nekongrua nom-etendigo"
+
+#: directives.c:1167
+#, c-format
+msgid "registering pragma \"%s\" with name expansion and no namespace"
+msgstr "registro de pragma \"%s\" kun nom-etendigo kaj sen nomspaco"
+
+#: directives.c:1185
+#, c-format
+msgid "registering \"%s\" as both a pragma and a pragma namespace"
+msgstr "registro de \"%s\" kaj kiel pragma kaj kiel pragma-nomspaco"
+
+#: directives.c:1188
+#, c-format
+msgid "#pragma %s %s is already registered"
+msgstr "#pragma %s %s jam estas registrita"
+
+#: directives.c:1191
+#, c-format
+msgid "#pragma %s is already registered"
+msgstr "#pragma %s jam estas registrita"
+
+#: directives.c:1221
+msgid "registering pragma with NULL handler"
+msgstr "registro de pragma kun traktilo de NULL"
+
+#: directives.c:1462
+msgid "#pragma once in main file"
+msgstr "#pragma unufoje en ĉefdosiero"
+
+#: directives.c:1485
+msgid "invalid #pragma push_macro directive"
+msgstr "malvalida instrukcio #pragma push_macro"
+
+#: directives.c:1540
+msgid "invalid #pragma pop_macro directive"
+msgstr "malvalida instrukcio #pragma pop_macro"
+
+#: directives.c:1595
+msgid "invalid #pragma GCC poison directive"
+msgstr "malvalida instrukcio #pragma GCC poison"
+
+#: directives.c:1604
+#, c-format
+msgid "poisoning existing macro \"%s\""
+msgstr "venenigo de ekzistanta makroo \"%s\""
+
+#: directives.c:1623
+msgid "#pragma system_header ignored outside include file"
+msgstr "#pragma system_header estis preteratentata for de inkluziv-dosiero"
+
+#: directives.c:1648
+#, c-format
+msgid "cannot find source file %s"
+msgstr "ne eblas trovi la fontan dosieron %s"
+
+#: directives.c:1652
+#, c-format
+msgid "current file is older than %s"
+msgstr "nuna dosiero estas pli malnova ol %s"
+
+#: directives.c:1837
+msgid "_Pragma takes a parenthesized string literal"
+msgstr "_Pragma prenas kurbkrampitan ĉenan literaĵon"
+
+#: directives.c:1958
+msgid "#else without #if"
+msgstr "#else sen #if"
+
+#: directives.c:1963
+msgid "#else after #else"
+msgstr "#else post #else"
+
+#: directives.c:1965 directives.c:1998
+msgid "the conditional began here"
+msgstr "la kondiĉo komencis ĉi tie"
+
+#: directives.c:1991
+msgid "#elif without #if"
+msgstr "#elif sen #if"
+
+#: directives.c:1996
+msgid "#elif after #else"
+msgstr "#elif post #else"
+
+#: directives.c:2034
+msgid "#endif without #if"
+msgstr "#endif sen #if"
+
+#: directives.c:2114
+msgid "missing '(' after predicate"
+msgstr "mankas '(' post predikato"
+
+#: directives.c:2129
+msgid "missing ')' to complete answer"
+msgstr "mankas ')' por kompletigi respondon"
+
+#: directives.c:2149
+msgid "predicate's answer is empty"
+msgstr "respondo de predikato estas malplena"
+
+#: directives.c:2176
+msgid "assertion without predicate"
+msgstr "aserto sen predikato"
+
+#: directives.c:2179
+msgid "predicate must be an identifier"
+msgstr "predikato devas esti identiganto"
+
+#: directives.c:2265
+#, c-format
+msgid "\"%s\" re-asserted"
+msgstr "\"%s\" estas re-asertita"
+
+#: directives.c:2556
+#, c-format
+msgid "unterminated #%s"
+msgstr "nefinigita #%s"
+
+#: directives-only.c:222 lex.c:2133 traditional.c:163
+msgid "unterminated comment"
+msgstr "nefinigita komento"
+
+#: errors.c:235
+msgid "stdout"
+msgstr "ĉefeligujo"
+
+#: errors.c:237
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: expr.c:424
+msgid "too many decimal points in number"
+msgstr "tro multaj frakciaj ciferoj en numero"
+
+#: expr.c:453 expr.c:547
+msgid "fixed-point constants are a GCC extension"
+msgstr "fisk-komaj konstantoj estas aldono de GCC"
+
+#: expr.c:466
+#, c-format
+msgid "invalid digit \"%c\" in binary constant"
+msgstr "malvalida cifero \"%c\" en duuma konstanto"
+
+#: expr.c:468
+#, c-format
+msgid "invalid digit \"%c\" in octal constant"
+msgstr "malvalida cifero \"%c\" en okuma konstanto"
+
+#: expr.c:476
+msgid "invalid prefix \"0b\" for floating constant"
+msgstr "malvalida prefikso \"0b\" por glitkoma konstanto"
+
+#: expr.c:481
+msgid "no digits in hexadecimal floating constant"
+msgstr "neniu cifero en deksesuma glitkoma konstanto"
+
+#: expr.c:485
+msgid "use of C99 hexadecimal floating constant"
+msgstr "uzo de deksesuma glitkoma konstanto laŭ C99"
+
+#: expr.c:494
+msgid "exponent has no digits"
+msgstr "eksponento ne havas ciferojn"
+
+#: expr.c:501
+msgid "hexadecimal floating constants require an exponent"
+msgstr "deksesumaj glitkomaj konstantoj postulas eksponenton"
+
+#: expr.c:515
+#, c-format
+msgid "invalid suffix \"%.*s\" on floating constant"
+msgstr "malvalida sufikso \"%.*s\" en glitkoma konstanto"
+
+#: expr.c:526 expr.c:585
+#, c-format
+msgid "traditional C rejects the \"%.*s\" suffix"
+msgstr "tradicia C rifuzas la sufikson \"%.*s\""
+
+#: expr.c:534
+msgid "suffix for double constant is a GCC extension"
+msgstr "sufikso por duobla konstanto estas aldono de GCC"
+
+#: expr.c:540
+#, c-format
+msgid "invalid suffix \"%.*s\" with hexadecimal floating constant"
+msgstr "malvalida sufikso \"%.*s\" kun deksesuma glitkoma konstanto"
+
+#: expr.c:551
+msgid "decimal float constants are a GCC extension"
+msgstr "dekumaj glitkomaj konstantoj estas aldono de GCC"
+
+#: expr.c:569
+#, c-format
+msgid "invalid suffix \"%.*s\" on integer constant"
+msgstr "malvalida sufikso \"%.*s\" en entjera konstanto"
+
+#: expr.c:593
+msgid "use of C++0x long long integer constant"
+msgstr "uzo de konstanto C++0x long long integer"
+
+#: expr.c:594
+msgid "use of C99 long long integer constant"
+msgstr "uzo de konstanto de C99 long long integer"
+
+#: expr.c:608
+msgid "imaginary constants are a GCC extension"
+msgstr "imaginaraj konstantoj estas aldono de GCC"
+
+#: expr.c:611
+msgid "binary constants are a GCC extension"
+msgstr "duumaj konstantoj estas aldono de GCC"
+
+#: expr.c:704
+msgid "integer constant is too large for its type"
+msgstr "entjera konstanto tro larĝas pro ties tipo"
+
+#: expr.c:735
+msgid "integer constant is so large that it is unsigned"
+msgstr "entjera konstanto estas tiom larĝa ke ĝi estas sen-signuma"
+
+#: expr.c:830
+msgid "missing ')' after \"defined\""
+msgstr "mankas ')' post \"defined\""
+
+#: expr.c:837
+msgid "operator \"defined\" requires an identifier"
+msgstr "la operatoro \"defined\" postulas identiganton"
+
+#: expr.c:845
+#, c-format
+msgid "(\"%s\" is an alternative token for \"%s\" in C++)"
+msgstr "(\"%s\" estas alternativa ĵetono por \"%s\" en C++)"
+
+#: expr.c:855
+msgid "this use of \"defined\" may not be portable"
+msgstr "tiu ĉi uzo de \"defined\" eble ne estas portebla"
+
+#: expr.c:914
+msgid "user-defined literal in preprocessor expression"
+msgstr "uzant-difinita literaĵo en antaŭproceza esprimo"
+
+#: expr.c:919
+msgid "floating constant in preprocessor expression"
+msgstr "glitkoma konstanto en antaŭproceza esprimo"
+
+#: expr.c:925
+msgid "imaginary number in preprocessor expression"
+msgstr "imaginara numero en antaŭproceza esprimo"
+
+#: expr.c:972
+#, c-format
+msgid "\"%s\" is not defined"
+msgstr "\"%s\" ne estas difinita"
+
+#: expr.c:984
+msgid "assertions are a GCC extension"
+msgstr "asertoj estas aldono de GCC"
+
+#: expr.c:987
+msgid "assertions are a deprecated extension"
+msgstr "asertoj estas evitinda aldono"
+
+#: expr.c:1120 expr.c:1149
+#, c-format
+msgid "missing binary operator before token \"%s\""
+msgstr "mankas duuma operatoro antaŭ la ĵetono \"%s\""
+
+#: expr.c:1140
+#, c-format
+msgid "token \"%s\" is not valid in preprocessor expressions"
+msgstr "la ĵetono \"%s\" ne estas valida en antaŭprocezaj esprimoj"
+
+#: expr.c:1157
+msgid "missing expression between '(' and ')'"
+msgstr "mankas esprimo inter '(' kaj ')'"
+
+#: expr.c:1160
+#, c-format
+msgid "%s with no expression"
+msgstr "%s sen iu ajn esprimo"
+
+#: expr.c:1163
+#, c-format
+msgid "operator '%s' has no right operand"
+msgstr "la operatoro '%s' havas neniun desktran operaciaton"
+
+#: expr.c:1168
+#, c-format
+msgid "operator '%s' has no left operand"
+msgstr "la operatoro '%s' havas neniun maldesktran operaciaton"
+
+#: expr.c:1194
+msgid " ':' without preceding '?'"
+msgstr " ':' sen antaŭanta '?'"
+
+#: expr.c:1222
+#, c-format
+msgid "unbalanced stack in %s"
+msgstr "neekvilibrita stako en %s"
+
+#: expr.c:1242
+#, c-format
+msgid "impossible operator '%u'"
+msgstr "neebla operatoro '%u'"
+
+#: expr.c:1343
+msgid "missing ')' in expression"
+msgstr "mankas ')' en esprimo"
+
+#: expr.c:1372
+msgid "'?' without following ':'"
+msgstr "'?' sen sekvanta ':'"
+
+#: expr.c:1382
+msgid "integer overflow in preprocessor expression"
+msgstr "entjera troigo en antaŭproceza esprimo"
+
+#: expr.c:1387
+msgid "missing '(' in expression"
+msgstr "mankas '(' en esprimo"
+
+#: expr.c:1419
+#, c-format
+msgid "the left operand of \"%s\" changes sign when promoted"
+msgstr "la maldekstra operaciato de \"%s\" ŝanĝas signumon kiam promociita"
+
+#: expr.c:1424
+#, c-format
+msgid "the right operand of \"%s\" changes sign when promoted"
+msgstr "la dekstra operaciato de \"%s\" ŝanĝas signumon kiam promociita"
+
+#: expr.c:1683
+msgid "traditional C rejects the unary plus operator"
+msgstr "tradicia C rifuzas la unuloka plusan operatoron"
+
+#: expr.c:1766
+msgid "comma operator in operand of #if"
+msgstr "koma operatoro en operaciado de #if"
+
+#: expr.c:1902
+msgid "division by zero in #if"
+msgstr "divido per nulo en #if"
+
+#: files.c:463
+msgid "NULL directory in find_file"
+msgstr "NULL-dosierujo en find_file"
+
+#: files.c:500
+msgid "one or more PCH files were found, but they were invalid"
+msgstr "unu aŭ pli dosieroj PCH estis trovataj, sed ili estas malvalidaj"
+
+#: files.c:503
+msgid "use -Winvalid-pch for more information"
+msgstr "uzu -Winvalid-pch por pli da informo"
+
+#: files.c:594
+#, c-format
+msgid "%s is a block device"
+msgstr "%s estas blok-aparato"
+
+#: files.c:611
+#, c-format
+msgid "%s is too large"
+msgstr "%s tro larĝas"
+
+#: files.c:646
+#, c-format
+msgid "%s is shorter than expected"
+msgstr "%s estas pli mallonga ol atendite"
+
+#: files.c:881
+#, c-format
+msgid "no include path in which to search for %s"
+msgstr "estas neniu inkluziva vojo por serĉi %s"
+
+#: files.c:1305
+msgid "Multiple include guards may be useful for:\n"
+msgstr "Multoblaj inkluzivaj gardnodoj povas esti utilaj por:\n"
+
+#: init.c:512
+msgid "cppchar_t must be an unsigned type"
+msgstr "cppchar_t devas esti sensignuma tipo"
+
+#: init.c:516
+#, c-format
+msgid "preprocessor arithmetic has maximum precision of %lu bits; target requires %lu bits"
+msgstr "antaŭproceza aritmetiko havas maksimuman precizecon de %lu bitoj; la celo postulas %lu bitojn"
+
+#: init.c:523
+msgid "CPP arithmetic must be at least as precise as a target int"
+msgstr "Aritmetiko de CPP devas esti minimue tiel preciza kiel la celata int"
+
+#: init.c:526
+msgid "target char is less than 8 bits wide"
+msgstr "la celata char estas pli eta ol 8 bitoj"
+
+#: init.c:530
+msgid "target wchar_t is narrower than target char"
+msgstr "la celata wchar_t estas pli mallarĝa ol la celata char"
+
+#: init.c:534
+msgid "target int is narrower than target char"
+msgstr "la celata int estas pli mallarĝa ol la celata char"
+
+#: init.c:539
+msgid "CPP half-integer narrower than CPP character"
+msgstr "duon-entjero de CPP estas pli mallarĝa ol la signo de CPP"
+
+#: init.c:543
+#, c-format
+msgid "CPP on this host cannot handle wide character constants over %lu bits, but the target requires %lu bits"
+msgstr "CPP en tiu ĉi komputilo ne povas trakti larĝ-signajn konstantoj plilarĝaj ol %lu bitoj, sed la celato postulas %lu bitojn"
+
+#: lex.c:846
+msgid "backslash and newline separated by space"
+msgstr "retroklino kaj novlinio apartitaj de spaco"
+
+#: lex.c:851
+msgid "backslash-newline at end of file"
+msgstr "retroklino-novlinio ĉe dosierfino"
+
+#: lex.c:867
+#, c-format
+msgid "trigraph ??%c converted to %c"
+msgstr "trigrafikaĵo ??%c konvertita al %c"
+
+#: lex.c:875
+#, c-format
+msgid "trigraph ??%c ignored, use -trigraphs to enable"
+msgstr "trigrafikaĵo ??%c preteratentita, uzu -trigraphs por ebligi"
+
+#: lex.c:924
+msgid "\"/*\" within comment"
+msgstr "\"/*\" ene de komento"
+
+#: lex.c:982
+#, c-format
+msgid "%s in preprocessing directive"
+msgstr "%s en antaŭproceza instrukcio"
+
+#: lex.c:991
+msgid "null character(s) ignored"
+msgstr "nul-signo(j) estas preteratentitaj"
+
+#: lex.c:1028
+#, c-format
+msgid "`%.*s' is not in NFKC"
+msgstr "'%.*s' ne estas en NFKC"
+
+#: lex.c:1031
+#, c-format
+msgid "`%.*s' is not in NFC"
+msgstr "'%.*s' ne estas en NFC"
+
+#: lex.c:1099 lex.c:1176
+#, c-format
+msgid "attempt to use poisoned \"%s\""
+msgstr "provo uzi venenitan \"%s\""
+
+#: lex.c:1107 lex.c:1184
+msgid "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro"
+msgstr "__VA_ARGS__ nur povas aperi en la etendigo de variebl-argumenta makroo de C99"
+
+#: lex.c:1113 lex.c:1190
+#, c-format
+msgid "identifier \"%s\" is a special operator name in C++"
+msgstr "la identiganto \"%s\" estas speciala operator-nomo en C++"
+
+#: lex.c:1334
+msgid "raw string delimiter longer than 16 characters"
+msgstr "kruda ĉen-apartigilo pli longas ol 16 signoj"
+
+#: lex.c:1337
+#, c-format
+msgid "invalid character '%c' in raw string delimiter"
+msgstr "malvalida signo '%c' en kruda ĉen-apartigilo"
+
+#: lex.c:1460 lex.c:1482
+msgid "unterminated raw string"
+msgstr "nefinigita kruda ĉeno"
+
+#: lex.c:1601
+msgid "null character(s) preserved in literal"
+msgstr "nul-signo(j) tenitaj en literaĵo"
+
+#: lex.c:1604
+#, c-format
+msgid "missing terminating %c character"
+msgstr "mankas finigantan signon %c"
+
+#: lex.c:2144
+msgid "C++ style comments are not allowed in ISO C90"
+msgstr "Komentojn laŭ la estilo de C++ ne estas permesataj en ISO C90"
+
+#: lex.c:2146
+msgid "(this will be reported only once per input file)"
+msgstr "(tio ĉi estos raportata nur po unu foje por ĉiu enigdosiero)"
+
+#: lex.c:2151
+msgid "multi-line comment"
+msgstr "plurlinia komento"
+
+#: lex.c:2471
+#, c-format
+msgid "unspellable token %s"
+msgstr "neliterumebla ĵetono %s"
+
+#: macro.c:188
+#, c-format
+msgid "macro \"%s\" is not used"
+msgstr "makroo \"%s\" ne estas uzata"
+
+#: macro.c:226 macro.c:423
+#, c-format
+msgid "invalid built-in macro \"%s\""
+msgstr "malvalida enkonstruita makroo \"%s\""
+
+#: macro.c:260
+msgid "could not determine file timestamp"
+msgstr "ne eblis determini la dosieran tempomarkon"
+
+#: macro.c:358
+msgid "could not determine date and time"
+msgstr "ne eblis determini la daton kaj horon"
+
+#: macro.c:374
+msgid "__COUNTER__ expanded inside directive with -fdirectives-only"
+msgstr "__COUNTER__ estas etendigata interne de instrukcio per -fdirectives-only"
+
+#: macro.c:532
+msgid "invalid string literal, ignoring final '\\'"
+msgstr "malvalida ĉena literaĵo, ni preterpasas finan '\\'"
+
+#: macro.c:592
+#, c-format
+msgid "pasting \"%s\" and \"%s\" does not give a valid preprocessing token"
+msgstr "algluo de \"%s\" kaj \"%s\" ne rezultas en valida antaŭproceza ĵetono"
+
+#: macro.c:682
+msgid "ISO C99 requires rest arguments to be used"
+msgstr "ISO C99 postulas ke restantaj argumentoj estu uzataj"
+
+#: macro.c:687
+#, c-format
+msgid "macro \"%s\" requires %u arguments, but only %u given"
+msgstr "la makroo \"%s\" postulas %u argumentojn, sed nur %u estis indikataj"
+
+#: macro.c:692
+#, c-format
+msgid "macro \"%s\" passed %u arguments, but takes just %u"
+msgstr "la makroo \"%s\" pasis %u argumentojn, sed ĝi prenas nur %u"
+
+#: macro.c:886 traditional.c:681
+#, c-format
+msgid "unterminated argument list invoking macro \"%s\""
+msgstr "nefinigita argumentlisto alvokanta la makroon \"%s\""
+
+#: macro.c:1026
+#, c-format
+msgid "function-like macro \"%s\" must be used with arguments in traditional C"
+msgstr "funkci-simila makroo \"%s\" devas esti uzata kun argumentoj laŭ tradicia C"
+
+#: macro.c:1694
+#, c-format
+msgid "invoking macro %s argument %d: empty macro arguments are undefined in ISO C90 and ISO C++98"
+msgstr "alvoko de makroo %s, argumento %d: malplenaj makro-argumentoj estas nedifinitaj en ISO C90 kaj ISO C++98"
+
+#: macro.c:2596
+#, c-format
+msgid "duplicate macro parameter \"%s\""
+msgstr "duobligata makro-parametro \"%s\""
+
+#: macro.c:2642
+#, c-format
+msgid "\"%s\" may not appear in macro parameter list"
+msgstr "\"%s\" ne povas aperi en makroa parametro-listo"
+
+#: macro.c:2650
+msgid "macro parameters must be comma-separated"
+msgstr "makro-parametroj devas esti apartitaj per komoj"
+
+#: macro.c:2667
+msgid "parameter name missing"
+msgstr "mankas parametra nomo"
+
+#: macro.c:2685
+msgid "anonymous variadic macros were introduced in C99"
+msgstr "sennomaj variebl-argumentaj makrooj estis enkondukataj en C99"
+
+#: macro.c:2690
+msgid "ISO C does not permit named variadic macros"
+msgstr "ISO C ne permesas nomitajn variebl-argumentajn makroojn"
+
+#: macro.c:2699
+msgid "missing ')' in macro parameter list"
+msgstr "mankas ')' en makroa parametro-listo"
+
+#: macro.c:2748
+msgid "'##' cannot appear at either end of a macro expansion"
+msgstr "'##' ne povas aperi ĉe iu ajn fino de makroa etendigo"
+
+#: macro.c:2783
+msgid "ISO C99 requires whitespace after the macro name"
+msgstr "ISO C99 postulas blankspacon post la makroa nomo"
+
+#: macro.c:2807
+msgid "missing whitespace after the macro name"
+msgstr "mankas blankspacon post la makroa nomo"
+
+#: macro.c:2841
+msgid "'#' is not followed by a macro parameter"
+msgstr "'#' ne estas sekvata de makroa parametro"
+
+#: macro.c:2999
+#, c-format
+msgid "\"%s\" redefined"
+msgstr "\"%s\" estas redifinita"
+
+#: macro.c:3005
+msgid "this is the location of the previous definition"
+msgstr "tiu ĉi estas la loko de la antaŭa difino"
+
+#: macro.c:3066
+#, c-format
+msgid "macro argument \"%s\" would be stringified in traditional C"
+msgstr "makroa argumento \"%s\" devus esti ĉenigita laŭ tradicia C"
+
+#: macro.c:3093
+#, c-format
+msgid "invalid hash type %d in cpp_macro_definition"
+msgstr "malvalida haketa tipo %d en cpp_macro_definition"
+
+#: pch.c:88 pch.c:336 pch.c:348 pch.c:366 pch.c:372 pch.c:381 pch.c:388
+msgid "while writing precompiled header"
+msgstr "dum skribo de antaŭkompilita kapo"
+
+#: pch.c:608
+#, c-format
+msgid "%s: not used because `%.*s' is poisoned"
+msgstr "%s: ne uzata ĉar '%.*s' estas venenita"
+
+#: pch.c:630
+#, c-format
+msgid "%s: not used because `%.*s' not defined"
+msgstr "%s: ne uzata ĉar '%.*s' ne estas difinita"
+
+#: pch.c:642
+#, c-format
+msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'"
+msgstr "%s: ne uzata ĉar '%.*s' estas difinita kiel '%s', ne '%.*s'"
+
+#: pch.c:683
+#, c-format
+msgid "%s: not used because `%s' is defined"
+msgstr "%s: ne uzata ĉar '%s' estas difinita"
+
+#: pch.c:703
+#, c-format
+msgid "%s: not used because `__COUNTER__' is invalid"
+msgstr "%s: ne uzata ĉar '__COUNTER__' estas malvalida"
+
+#: pch.c:712 pch.c:888
+msgid "while reading precompiled header"
+msgstr "dum lego de antaŭkompilita kapo"
+
+#: traditional.c:751
+#, c-format
+msgid "detected recursion whilst expanding macro \"%s\""
+msgstr "estis detektata rekursigo dum etendigo de la makroo \"%s\""
+
+#: traditional.c:969
+msgid "syntax error in macro parameter list"
+msgstr "sintaksa eraro en makroa parametro-listo"
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 396b1af6da9..b7ba52ec9cd 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,10 @@
+2013-02-21 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR libfortran/30162
+ * io/open.c (test_endfile): Call stell only if size != 0.
+ * io/unix.c (raw_tell): Revert r194694.
+ (raw_size): Return size field only for regular files, otherwise 0.
+
2012-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/30162
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c
index 8f969edb5e1..044f480e04a 100644
--- a/libgfortran/io/open.c
+++ b/libgfortran/io/open.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Andy Vaught
F2003 I/O support contributed by Jerry DeLisle
@@ -153,8 +152,12 @@ static const st_option async_opt[] =
static void
test_endfile (gfc_unit * u)
{
- if (u->endfile == NO_ENDFILE && ssize (u->s) == stell (u->s))
- u->endfile = AT_ENDFILE;
+ if (u->endfile == NO_ENDFILE)
+ {
+ gfc_offset sz = ssize (u->s);
+ if (sz == 0 || sz == stell (u->s))
+ u->endfile = AT_ENDFILE;
+ }
}
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 87c3788557f..8421451e78c 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -1,6 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Andy Vaught
F2003 I/O support contributed by Jerry DeLisle
@@ -329,15 +327,7 @@ raw_seek (unix_stream * s, gfc_offset offset, int whence)
static gfc_offset
raw_tell (unix_stream * s)
{
- gfc_offset x;
- x = lseek (s->fd, 0, SEEK_CUR);
-
- /* Non-seekable files should always be assumed to be at
- current position. */
- if (x == -1 && errno == ESPIPE)
- x = 0;
-
- return x;
+ return lseek (s->fd, 0, SEEK_CUR);
}
static gfc_offset
@@ -347,7 +337,10 @@ raw_size (unix_stream * s)
int ret = fstat (s->fd, &statbuf);
if (ret == -1)
return ret;
- return statbuf.st_size;
+ if (S_ISREG (statbuf.st_mode))
+ return statbuf.st_size;
+ else
+ return 0;
}
static int
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 25a5994469f..ffeb6bf7c0b 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,21 @@
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2013-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56217
+ * testsuite/libgomp.c++/pr56217.C: New test.
+
+2013-01-22 Alan Modra <amodra@gmail.com>
+
+ PR libgomp/51376
+ PR libgomp/56073
+ * task.c (GOMP_task): Revert 2011-12-09 change.
+ (GOMP_taskwait): Likewise. Instead use atomic load with acquire
+ barrier to read task->children..
+ (gomp_barrier_handle_tasks): ..and matching atomic store with
+ release barrier here when setting parent->children to NULL.
+
2012-11-21 Jakub Jelinek <jakub@redhat.com>
PR libgomp/55411
diff --git a/libgomp/task.c b/libgomp/task.c
index 4b75850072b..13e6605a99f 100644
--- a/libgomp/task.c
+++ b/libgomp/task.c
@@ -116,11 +116,19 @@ GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *),
}
else
fn (data);
- if (team != NULL)
+ /* Access to "children" is normally done inside a task_lock
+ mutex region, but the only way this particular task.children
+ can be set is if this thread's task work function (fn)
+ creates children. So since the setter is *this* thread, we
+ need no barriers here when testing for non-NULL. We can have
+ task.children set by the current thread then changed by a
+ child thread, but seeing a stale non-NULL value is not a
+ problem. Once past the task_lock acquisition, this thread
+ will see the real value of task.children. */
+ if (task.children != NULL)
{
gomp_mutex_lock (&team->task_lock);
- if (task.children != NULL)
- gomp_clear_parent (task.children);
+ gomp_clear_parent (task.children);
gomp_mutex_unlock (&team->task_lock);
}
gomp_end_task ();
@@ -258,7 +266,13 @@ gomp_barrier_handle_tasks (gomp_barrier_state_t state)
parent->children = child_task->next_child;
else
{
- parent->children = NULL;
+ /* We access task->children in GOMP_taskwait
+ outside of the task lock mutex region, so
+ need a release barrier here to ensure memory
+ written by child_task->fn above is flushed
+ before the NULL is written. */
+ __atomic_store_n (&parent->children, NULL,
+ MEMMODEL_RELEASE);
if (parent->in_taskwait)
gomp_sem_post (&parent->taskwait_sem);
}
@@ -291,7 +305,14 @@ GOMP_taskwait (void)
struct gomp_task *child_task = NULL;
struct gomp_task *to_free = NULL;
- if (task == NULL || team == NULL)
+ /* The acquire barrier on load of task->children here synchronizes
+ with the write of a NULL in gomp_barrier_handle_tasks. It is
+ not necessary that we synchronize with other non-NULL writes at
+ this point, but we must ensure that all writes to memory by a
+ child thread task work function are seen before we exit from
+ GOMP_taskwait. */
+ if (task == NULL
+ || __atomic_load_n (&task->children, MEMMODEL_ACQUIRE) == NULL)
return;
gomp_mutex_lock (&team->task_lock);
diff --git a/libgomp/testsuite/libgomp.c++/pr56217.C b/libgomp/testsuite/libgomp.c++/pr56217.C
new file mode 100644
index 00000000000..19da9185350
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr56217.C
@@ -0,0 +1,36 @@
+// PR middle-end/56217
+// { dg-do run }
+// { dg-options "-std=c++0x" }
+
+extern "C" void abort ();
+
+template <typename T>
+struct ptr {
+ T *p;
+ ptr () : p () {}
+ ptr (ptr &) = delete;
+ ptr (ptr &&o) : p(o) {}
+ operator T * () { return p; }
+};
+
+int a[6] = { 100, 101, 102, 103, 104, 105 };
+
+static ptr<int>
+f ()
+{
+ ptr<int> pt;
+ #pragma omp task shared (pt)
+ pt.p = a + 2;
+ #pragma omp taskwait
+ return pt;
+}
+
+int
+main ()
+{
+ ptr<int> pt;
+ #pragma omp parallel
+ #pragma omp single
+ if (f () != a + 2 || *f () != 102)
+ abort ();
+}
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index abeaf7be324..e9e39751cc7 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,12 @@
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2013-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/56245
+ * regex.c (PTR_INT_TYPE): Define.
+ (EXTEND_BUFFER): Change incr type from int to PTR_INT_TYPE.
+
2013-01-31 Kai Tietz <ktietz@redhat.com>
Merged from trunk
diff --git a/libiberty/regex.c b/libiberty/regex.c
index d65eedb1670..e5ad222bacf 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -46,9 +46,11 @@
# if defined STDC_HEADERS && !defined emacs
# include <stddef.h>
+# define PTR_INT_TYPE ptrdiff_t
# else
/* We need this for `regex.h', and perhaps for the Emacs include files. */
# include <sys/types.h>
+# define PTR_INT_TYPE long
# endif
# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
@@ -2045,7 +2047,7 @@ static reg_errcode_t byte_compile_range (unsigned int range_start,
/* How many characters the new buffer can have? */ \
wchar_count = bufp->allocated / sizeof(UCHAR_T); \
if (wchar_count == 0) wchar_count = 1; \
- /* Truncate the buffer to CHAR_T align. */ \
+ /* Truncate the buffer to CHAR_T align. */ \
bufp->allocated = wchar_count * sizeof(UCHAR_T); \
RETALLOC (COMPILED_BUFFER_VAR, wchar_count, UCHAR_T); \
bufp->buffer = (char*)COMPILED_BUFFER_VAR; \
@@ -2054,7 +2056,7 @@ static reg_errcode_t byte_compile_range (unsigned int range_start,
/* If the buffer moved, move all the pointers into it. */ \
if (old_buffer != COMPILED_BUFFER_VAR) \
{ \
- int incr = COMPILED_BUFFER_VAR - old_buffer; \
+ PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer; \
MOVE_BUFFER_POINTER (b); \
MOVE_BUFFER_POINTER (begalt); \
if (fixup_alt_jump) \
@@ -2082,7 +2084,7 @@ static reg_errcode_t byte_compile_range (unsigned int range_start,
/* If the buffer moved, move all the pointers into it. */ \
if (old_buffer != COMPILED_BUFFER_VAR) \
{ \
- int incr = COMPILED_BUFFER_VAR - old_buffer; \
+ PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer; \
MOVE_BUFFER_POINTER (b); \
MOVE_BUFFER_POINTER (begalt); \
if (fixup_alt_jump) \
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj
index 7bab51b7459..7e35d424708 100644
--- a/libjava/classpath/ChangeLog.gcj
+++ b/libjava/classpath/ChangeLog.gcj
@@ -1,3 +1,9 @@
+2013-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/56258
+ * doc/cp-tools.texinfo (Virtual Machine Options): Use just
+ one @gccoptlist instead of 3 separate ones.
+
2012-09-20 Jakub Jelinek <jakub@redhat.com>
PR other/43620
diff --git a/libjava/classpath/doc/cp-tools.texinfo b/libjava/classpath/doc/cp-tools.texinfo
index f7a2d245e7d..72769624881 100644
--- a/libjava/classpath/doc/cp-tools.texinfo
+++ b/libjava/classpath/doc/cp-tools.texinfo
@@ -2022,7 +2022,7 @@ Doclet, grouped by type. Explanations are in the following sections.
@item Virtual Machine Options
@xref{Virtual Machine Options,,Options Controlling Gjdoc Behavior}.
-@gccoptlist{-classpath} @gccoptlist{-bootclasspath} @gccoptlist{-J}@var{vmopt}
+@gccoptlist{-classpath -bootclasspath -J @var{vmopt}}
@end table
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index cf83522da8b..cd4e0861d24 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,41 @@
+2013-02-20 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/std/streambuf (basic_streambuf): Fix unclosed Doxygen group.
+
+2013-02-20 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/55043
+ * include/bits/alloc_traits.h (allocator_traits::construct): Disable
+ unless construction would be well-formed.
+ (__allow_copy_cons, __check_copy_constructible): Define.
+ * include/bits/unordered_map.h (__check_copy_constructible): Use as
+ base class so copy constructor will be deleted if appropriate.
+ * include/bits/unordered_set.h: Likewise.
+ * include/std/unordered_set: Include alloc_traits.h.
+ * include/std/unordered_set: Likewise.
+ * include/debug/unordered_map.h: Default copy and move constructors.
+ * include/debug/unordered_set.h: Likewise.
+ * testsuite/23_containers/unordered_map/55043.cc: Fix test.
+ * testsuite/23_containers/unordered_multimap/55043.cc: Likewise.
+ * testsuite/23_containers/unordered_multiset/55043.cc: Likewise.
+ * testsuite/23_containers/unordered_set/55043.cc: Likewise.
+ * testsuite/23_containers/unordered_map/requirements/53339.cc: XFAIL,
+ cannot support incomplete types.
+ * testsuite/23_containers/unordered_multimap/requirements/53339.cc:
+ Likewise.
+ * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
+ dg-error line number.
+
+2013-02-18 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/std/functional (mem_fn): Qualify to prevent ADL.
+ * testsuite/20_util/function_objects/mem_fn/adl.cc: New.
+
+2013-02-18 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/bits/hashtable.h: Improve comments.
+ * include/bits/hashtable_policy.h: Likewise.
+
2013-01-24 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/56085
diff --git a/libstdc++-v3/include/bits/alloc_traits.h b/libstdc++-v3/include/bits/alloc_traits.h
index 3b129819d8e..bfa50de71cb 100644
--- a/libstdc++-v3/include/bits/alloc_traits.h
+++ b/libstdc++-v3/include/bits/alloc_traits.h
@@ -1,6 +1,6 @@
// Allocator traits -*- C++ -*-
-// Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,6 +39,9 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ template<typename _Tp>
+ class allocator;
+
template<typename _Alloc, typename _Tp>
class __alloctr_rebind_helper
{
@@ -254,7 +257,8 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
template<typename _Tp, typename... _Args>
static typename
- enable_if<!__construct_helper<_Tp, _Args...>::value, void>::type
+ enable_if<__and_<__not_<__construct_helper<_Tp, _Args...>>,
+ is_constructible<_Tp, _Args...>>::value, void>::type
_S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
{ ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
@@ -386,7 +390,8 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
* arguments @a __args...
*/
template<typename _Tp, typename... _Args>
- static void construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
+ static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
+ -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...))
{ _S_construct(__a, __p, std::forward<_Args>(__args)...); }
/**
@@ -506,6 +511,56 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
__do_alloc_on_swap(__one, __two, __pocs());
}
+ template<typename _Alloc>
+ class __is_copy_insertable_impl
+ {
+ typedef allocator_traits<_Alloc> _Traits;
+
+ template<typename _Up, typename
+ = decltype(_Traits::construct(std::declval<_Alloc&>(),
+ std::declval<_Up*>(),
+ std::declval<const _Up&>()))>
+ static true_type
+ _M_select(int);
+
+ template<typename _Up>
+ static false_type
+ _M_select(...);
+
+ public:
+ typedef decltype(_M_select<typename _Alloc::value_type>(0)) type;
+ };
+
+ // true if _Alloc::value_type is CopyInsertable into containers using _Alloc
+ template<typename _Alloc>
+ struct __is_copy_insertable
+ : __is_copy_insertable_impl<_Alloc>::type
+ { };
+
+ // std::allocator<_Tp> just requires CopyConstructible
+ template<typename _Tp>
+ struct __is_copy_insertable<allocator<_Tp>>
+ : is_copy_constructible<_Tp>
+ { };
+
+ // Used to allow copy construction of unordered containers
+ template<bool> struct __allow_copy_cons { };
+
+ // Used to delete copy constructor of unordered containers
+ template<>
+ struct __allow_copy_cons<false>
+ {
+ __allow_copy_cons() = default;
+ __allow_copy_cons(const __allow_copy_cons&) = delete;
+ __allow_copy_cons(__allow_copy_cons&&) = default;
+ __allow_copy_cons& operator=(const __allow_copy_cons&) = default;
+ __allow_copy_cons& operator=(__allow_copy_cons&&) = default;
+ };
+
+ template<typename _Alloc>
+ using __check_copy_constructible
+ = __allow_copy_cons<__is_copy_insertable<_Alloc>::value>;
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index b58189f9685..c7a8be05563 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -1,6 +1,7 @@
// hashtable.h header -*- C++ -*-
-// Copyright (C) 2007-2012 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -98,43 +99,44 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* - size_type _M_bucket_count
* - size_type _M_element_count
*
- * with _Bucket being _Hash_node* and _Hash_node constaining:
+ * with _Bucket being _Hash_node* and _Hash_node containing:
* - _Hash_node* _M_next
* - Tp _M_value
- * - size_t _M_code if cache_hash_code is true
+ * - size_t _M_hash_code if cache_hash_code is true
*
- * In terms of Standard containers the hastable is like the aggregation of:
+ * In terms of Standard containers the hashtable is like the aggregation of:
* - std::forward_list<_Node> containing the elements
* - std::vector<std::forward_list<_Node>::iterator> representing the buckets
*
- * The non-empty buckets contain the node before the first bucket node. This
- * design allow to implement something like a std::forward_list::insert_after
- * on container insertion and std::forward_list::erase_after on container
- * erase calls. _M_before_begin is equivalent to
- * std::foward_list::before_begin. Empty buckets are containing nullptr.
- * Note that one of the non-empty bucket contains &_M_before_begin which is
- * not a derefenrenceable node so the node pointers in buckets shall never be
- * derefenrenced, only its next node can be.
+ * The non-empty buckets contain the node before the first node in the
+ * bucket. This design makes it possible to implement something like a
+ * std::forward_list::insert_after on container insertion and
+ * std::forward_list::erase_after on container erase calls.
+ * _M_before_begin is equivalent to std::foward_list::before_begin.
+ * Empty buckets contain nullptr.
+ * Note that one of the non-empty buckets contains &_M_before_begin which is
+ * not a dereferenceable node so the node pointer in a bucket shall never be
+ * dereferenced, only its next node can be.
*
- * Walk through a bucket nodes require a check on the hash code to see if the
- * node is still in the bucket. Such a design impose a quite efficient hash
- * functor and is one of the reasons it is highly advise to set
- * __cache_hash_code to true.
+ * Walking through a bucket's nodes requires a check on the hash code to see
+ * if each node is still in the bucket. Such a design assumes a quite
+ * efficient hash functor and is one of the reasons it is
+ * highly advisable to set __cache_hash_code to true.
*
* The container iterators are simply built from nodes. This way incrementing
* the iterator is perfectly efficient independent of how many empty buckets
* there are in the container.
*
- * On insert we compute element hash code and thanks to it find the bucket
- * index. If the element must be inserted on an empty bucket we add it at the
- * beginning of the singly linked list and make the bucket point to
+ * On insert we compute the element's hash code and use it to it find the
+ * bucket index. If the element must be inserted in an empty bucket we add
+ * it at the beginning of the singly linked list and make the bucket point to
* _M_before_begin. The bucket that used to point to _M_before_begin, if any,
* is updated to point to its new before begin node.
*
- * On erase, the simple iterator design impose to use the hash functor to get
- * the index of the bucket to update. For this reason, when __cache_hash_code
- * is set to false, there is a static assertion that the hash functor cannot
- * throw.
+ * On erase, the simple iterator design requires using the hash functor to
+ * get the index of the bucket to update. For this reason, when
+ * __cache_hash_code is set to false, the hash functor must not throw
+ * and this is enforced by a statied assertion.
*/
template<typename _Key, typename _Value, typename _Allocator,
@@ -981,7 +983,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
else if (__result)
// All equivalent values are next to each other, if we found a not
// equivalent value after an equivalent one it means that we won't
- // find anymore an equivalent value.
+ // find any more equivalent values.
break;
if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n)
break;
@@ -1103,7 +1105,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
else
{
// The bucket is empty, the new node is inserted at the beginning of
- // the singly linked list and the bucket will contain _M_before_begin
+ // the singly-linked list and the bucket will contain _M_before_begin
// pointer.
__new_node->_M_nxt = _M_before_begin._M_nxt;
_M_before_begin._M_nxt = __new_node;
@@ -1251,7 +1253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
else
// The inserted node has no equivalent in the hashtable. We must
// insert the new node at the beginning of the bucket to preserve
- // equivalent elements relative positions.
+ // equivalent elements' relative positions.
_M_insert_bucket_begin(__bkt, __new_node);
++_M_element_count;
return iterator(__new_node);
@@ -1433,7 +1435,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
std::size_t __bkt = _M_bucket_index(__n);
// Look for previous node to unlink it from the erased one, this is why
- // we need buckets to contain the before begin to make this research fast.
+ // we need buckets to contain the before begin to make this search fast.
_BaseNode* __prev_n = _M_get_previous_node(__bkt, __n);
if (__n == _M_bucket_begin(__bkt))
_M_remove_bucket_begin(__bkt, __n->_M_next(),
diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h
index 631128a5d5e..2359e93d70f 100644
--- a/libstdc++-v3/include/bits/hashtable_policy.h
+++ b/libstdc++-v3/include/bits/hashtable_policy.h
@@ -59,8 +59,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __distance_fw(__first, __last, _Tag());
}
- // Helper type used to detect when the hash functor is noexcept qualified or
- // not
+ // Helper type used to detect whether the hash functor is noexcept.
template <typename _Key, typename _Hash>
struct __is_noexcept_hash : std::integral_constant<bool,
noexcept(declval<const _Hash&>()(declval<const _Key&>()))>
diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h
index 95f5657762a..37e570f1dc3 100644
--- a/libstdc++-v3/include/bits/unordered_map.h
+++ b/libstdc++-v3/include/bits/unordered_map.h
@@ -1,6 +1,6 @@
// unordered_map implementation -*- C++ -*-
-// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -50,7 +50,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Hash, __detail::_Mod_range_hashing,
__detail::_Default_ranged_hash,
__detail::_Prime_rehash_policy,
- __cache_hash_code, false, true>
+ __cache_hash_code, false, true>,
+ __check_copy_constructible<_Alloc>
{
typedef _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
@@ -123,7 +124,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Hash, __detail::_Mod_range_hashing,
__detail::_Default_ranged_hash,
__detail::_Prime_rehash_policy,
- __cache_hash_code, false, false>
+ __cache_hash_code, false, false>,
+ __check_copy_constructible<_Alloc>
{
typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
_Alloc,
diff --git a/libstdc++-v3/include/bits/unordered_set.h b/libstdc++-v3/include/bits/unordered_set.h
index 3d5361d4266..d65c79ccea1 100644
--- a/libstdc++-v3/include/bits/unordered_set.h
+++ b/libstdc++-v3/include/bits/unordered_set.h
@@ -1,6 +1,6 @@
// unordered_set implementation -*- C++ -*-
-// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -50,7 +50,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Hash, __detail::_Mod_range_hashing,
__detail::_Default_ranged_hash,
__detail::_Prime_rehash_policy,
- __cache_hash_code, true, true>
+ __cache_hash_code, true, true>,
+ __check_copy_constructible<_Alloc>
{
typedef _Hashtable<_Value, _Value, _Alloc,
std::_Identity<_Value>, _Pred,
@@ -134,7 +135,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Hash, __detail::_Mod_range_hashing,
__detail::_Default_ranged_hash,
__detail::_Prime_rehash_policy,
- __cache_hash_code, true, false>
+ __cache_hash_code, true, false>,
+ __check_copy_constructible<_Alloc>
{
typedef _Hashtable<_Value, _Value, _Alloc,
std::_Identity<_Value>, _Pred,
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index 1861b860e4c..4c562af1325 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -1,6 +1,6 @@
// Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -97,14 +97,12 @@ namespace __debug
__gnu_debug::__base(__last), __n,
__hf, __eql, __a) { }
- unordered_map(const unordered_map& __x)
- : _Base(__x) { }
+ unordered_map(const unordered_map& __x) = default;
unordered_map(const _Base& __x)
: _Base(__x) { }
- unordered_map(unordered_map&& __x)
- : _Base(std::move(__x)) { }
+ unordered_map(unordered_map&& __x) = default;
unordered_map(initializer_list<value_type> __l,
size_type __n = 0,
@@ -511,14 +509,12 @@ namespace __debug
__gnu_debug::__base(__last), __n,
__hf, __eql, __a) { }
- unordered_multimap(const unordered_multimap& __x)
- : _Base(__x) { }
+ unordered_multimap(const unordered_multimap& __x) = default;
unordered_multimap(const _Base& __x)
: _Base(__x) { }
- unordered_multimap(unordered_multimap&& __x)
- : _Base(std::move(__x)) { }
+ unordered_multimap(unordered_multimap&& __x) = default;
unordered_multimap(initializer_list<value_type> __l,
size_type __n = 0,
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set
index 7323184d438..b91a1781e6e 100644
--- a/libstdc++-v3/include/debug/unordered_set
+++ b/libstdc++-v3/include/debug/unordered_set
@@ -1,6 +1,6 @@
// Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -97,14 +97,12 @@ namespace __debug
__gnu_debug::__base(__last), __n,
__hf, __eql, __a) { }
- unordered_set(const unordered_set& __x)
- : _Base(__x) { }
+ unordered_set(const unordered_set& __x) = default;
unordered_set(const _Base& __x)
: _Base(__x) { }
- unordered_set(unordered_set&& __x)
- : _Base(std::move(__x)) { }
+ unordered_set(unordered_set&& __x) = default;
unordered_set(initializer_list<value_type> __l,
size_type __n = 0,
@@ -506,14 +504,12 @@ namespace __debug
__gnu_debug::__base(__last), __n,
__hf, __eql, __a) { }
- unordered_multiset(const unordered_multiset& __x)
- : _Base(__x) { }
+ unordered_multiset(const unordered_multiset& __x) = default;
unordered_multiset(const _Base& __x)
: _Base(__x) { }
- unordered_multiset(unordered_multiset&& __x)
- : _Base(std::move(__x)) { }
+ unordered_multiset(unordered_multiset&& __x) = default;
unordered_multiset(initializer_list<value_type> __l,
size_type __n = 0,
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 782400b39c6..e2cdd65f4c1 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -1,7 +1,7 @@
// <functional> -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-// 2011, 2012 Free Software Foundation, Inc.
+// 2011, 2012, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -245,7 +245,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
>::type
__invoke(_Functor& __f, _Args&&... __args)
{
- return mem_fn(__f)(std::forward<_Args>(__args)...);
+ return std::mem_fn(__f)(std::forward<_Args>(__args)...);
}
// To pick up function references (that will become function pointers)
@@ -1709,12 +1709,12 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
template<typename _Member, typename _Class>
inline _Mem_fn<_Member _Class::*>
__callable_functor(_Member _Class::* &__p)
- { return mem_fn(__p); }
+ { return std::mem_fn(__p); }
template<typename _Member, typename _Class>
inline _Mem_fn<_Member _Class::*>
__callable_functor(_Member _Class::* const &__p)
- { return mem_fn(__p); }
+ { return std::mem_fn(__p); }
template<typename _Signature>
class function;
@@ -1969,7 +1969,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
static _Res
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
{
- return mem_fn(_Base::_M_get_pointer(__functor)->__value)(
+ return std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
std::forward<_ArgTypes>(__args)...);
}
};
@@ -2009,7 +2009,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
static void
_M_invoke(const _Any_data& __functor, _ArgTypes... __args)
{
- mem_fn(_Base::_M_get_pointer(__functor)->__value)(
+ std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
std::forward<_ArgTypes>(__args)...);
}
};
diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf
index 82a67da42d4..535088068e0 100644
--- a/libstdc++-v3/include/std/streambuf
+++ b/libstdc++-v3/include/std/streambuf
@@ -1,7 +1,7 @@
// Stream buffer classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// 2006, 2007, 2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -171,20 +171,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2);
protected:
- //@{
- /**
+ /*
* This is based on _IO_FILE, just reordered to be more consistent,
* and is intended to be the most minimal abstraction for an
* internal buffer.
* - get == input == read
* - put == output == write
*/
- char_type* _M_in_beg; // Start of get area.
- char_type* _M_in_cur; // Current read area.
- char_type* _M_in_end; // End of get area.
- char_type* _M_out_beg; // Start of put area.
- char_type* _M_out_cur; // Current put area.
- char_type* _M_out_end; // End of put area.
+ char_type* _M_in_beg; ///< Start of get area.
+ char_type* _M_in_cur; ///< Current read area.
+ char_type* _M_in_end; ///< End of get area.
+ char_type* _M_out_beg; ///< Start of put area.
+ char_type* _M_out_cur; ///< Current put area.
+ char_type* _M_out_end; ///< End of put area.
/// Current locale setting.
locale _M_buf_locale;
diff --git a/libstdc++-v3/include/std/unordered_map b/libstdc++-v3/include/std/unordered_map
index e77a2972af8..1476a0c037a 100644
--- a/libstdc++-v3/include/std/unordered_map
+++ b/libstdc++-v3/include/std/unordered_map
@@ -1,6 +1,6 @@
// <unordered_map> -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -40,6 +40,7 @@
#include <initializer_list>
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
+#include <bits/alloc_traits.h>
#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
#include <bits/functional_hash.h>
#include <bits/hashtable.h>
diff --git a/libstdc++-v3/include/std/unordered_set b/libstdc++-v3/include/std/unordered_set
index 739e0a4a449..aafbb7663b6 100644
--- a/libstdc++-v3/include/std/unordered_set
+++ b/libstdc++-v3/include/std/unordered_set
@@ -1,6 +1,6 @@
// <unordered_set> -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -40,6 +40,7 @@
#include <initializer_list>
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
+#include <bits/alloc_traits.h>
#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
#include <bits/functional_hash.h>
#include <bits/hashtable.h>
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/adl.cc b/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/adl.cc
new file mode 100644
index 00000000000..cd7d0864f3f
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/adl.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <functional>
+
+namespace n {
+ struct X { int i; };
+ void mem_fn(int X::*);
+}
+
+using n::X;
+
+X x{};
+int X::* p = &X::i;
+
+int test01()
+{
+ auto ref = std::ref(p);
+ return ref(x);
+}
+
+int test02()
+{
+ std::function<int(X)> fun(p);
+ return fun(x);
+}
+
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc
new file mode 100644
index 00000000000..50e5437044c
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc
@@ -0,0 +1,69 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/55043
+
+#include <unordered_map>
+#include <vector>
+
+struct MoveOnly
+{
+ MoveOnly() = default;
+ MoveOnly(MoveOnly&&) = default;
+};
+
+using hash = std::hash<int>;
+using equal = std::equal_to<int>;
+
+template<typename Alloc>
+ using test_type = std::unordered_map<int, MoveOnly, hash, equal, Alloc>;
+
+void test01()
+{
+ typedef test_type<std::allocator<MoveOnly>> uim;
+ std::vector<uim> v;
+ v.emplace_back(uim());
+}
+
+// Unordered containers don't use allocator_traits yet so need full
+// Allocator interface, derive from std::allocator to get it.
+template<typename T, bool R>
+struct Alloc : std::allocator<T>
+{
+ template<typename U>
+ struct rebind { typedef Alloc<U, R> other; };
+
+ Alloc() = default;
+
+ template<typename U>
+ Alloc(const Alloc<U, R>&) { }
+
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
+
+ void construct(T* p, arg_type) const
+ { new((void*)p) T(); }
+};
+
+// verify is_copy_constructible depends on allocator
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
+
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53339.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53339.cc
new file mode 100644
index 00000000000..10404ce0814
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53339.cc
@@ -0,0 +1,36 @@
+// XFAIL because of PR libstdc++/55043 fix
+// { dg-do compile { xfail *-*-* } }
+// { dg-excess-errors "" }
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+
+struct LinkedHashMap
+{
+ struct Entry;
+
+ typedef std::unordered_map<int, Entry> Storage;
+ typedef Storage::iterator EntryPtr;
+
+ struct Entry
+ {
+ EntryPtr prev, next;
+ };
+};
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc
new file mode 100644
index 00000000000..afeecaad0ab
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc
@@ -0,0 +1,69 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/55043
+
+#include <unordered_map>
+#include <vector>
+
+struct MoveOnly
+{
+ MoveOnly() = default;
+ MoveOnly(MoveOnly&&) = default;
+};
+
+using hash = std::hash<int>;
+using equal = std::equal_to<int>;
+
+template<typename Alloc>
+ using test_type = std::unordered_multimap<int, MoveOnly, hash, equal, Alloc>;
+
+void test01()
+{
+ typedef test_type<std::allocator<MoveOnly>> uim;
+ std::vector<uim> v;
+ v.emplace_back(uim());
+}
+
+// Unordered containers don't use allocator_traits yet so need full
+// Allocator interface, derive from std::allocator to get it.
+template<typename T, bool R>
+struct Alloc : std::allocator<T>
+{
+ template<typename U>
+ struct rebind { typedef Alloc<U, R> other; };
+
+ Alloc() = default;
+
+ template<typename U>
+ Alloc(const Alloc<U, R>&) { }
+
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
+
+ void construct(T* p, arg_type) const
+ { new((void*)p) T(); }
+};
+
+// verify is_copy_constructible depends on allocator
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
+
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc
new file mode 100644
index 00000000000..cccd2a89513
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc
@@ -0,0 +1,36 @@
+// XFAIL because of PR libstdc++/55043 fix
+// { dg-do compile { xfail *-*-* } }
+// { dg-excess-errors "" }
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+
+struct LinkedHashMap
+{
+ struct Entry;
+
+ typedef std::unordered_multimap<int, Entry> Storage;
+ typedef Storage::iterator EntryPtr;
+
+ struct Entry
+ {
+ EntryPtr prev, next;
+ };
+};
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/55043.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/55043.cc
new file mode 100644
index 00000000000..9d71cff8583
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/55043.cc
@@ -0,0 +1,73 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/55043
+
+#include <unordered_set>
+#include <vector>
+
+struct MoveOnly
+{
+ MoveOnly() = default;
+ MoveOnly(MoveOnly&&) = default;
+};
+
+struct equal {
+ bool operator()(const MoveOnly&, const MoveOnly) const { return true; }
+};
+struct hash {
+ std::size_t operator()(const MoveOnly&) const { return 0; }
+};
+
+template<typename Alloc>
+ using test_type = std::unordered_multiset<MoveOnly, hash, equal, Alloc>;
+
+void test01()
+{
+ typedef test_type<std::allocator<MoveOnly>> uim;
+ std::vector<uim> v;
+ v.emplace_back(uim());
+}
+
+// Unordered containers don't use allocator_traits yet so need full
+// Allocator interface, derive from std::allocator to get it.
+template<typename T, bool R>
+struct Alloc : std::allocator<T>
+{
+ template<typename U>
+ struct rebind { typedef Alloc<U, R> other; };
+
+ Alloc() = default;
+
+ template<typename U>
+ Alloc(const Alloc<U, R>&) { }
+
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
+
+ void construct(T* p, arg_type) const
+ { new((void*)p) T(); }
+};
+
+// verify is_copy_constructible depends on allocator
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
+
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/55043.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/55043.cc
new file mode 100644
index 00000000000..152489042f7
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/55043.cc
@@ -0,0 +1,73 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/55043
+
+#include <unordered_set>
+#include <vector>
+
+struct MoveOnly
+{
+ MoveOnly() = default;
+ MoveOnly(MoveOnly&&) = default;
+};
+
+struct equal {
+ bool operator()(const MoveOnly&, const MoveOnly) const { return true; }
+};
+struct hash {
+ std::size_t operator()(const MoveOnly&) const { return 0; }
+};
+
+template<typename Alloc>
+ using test_type = std::unordered_set<MoveOnly, hash, equal, Alloc>;
+
+void test01()
+{
+ typedef test_type<std::allocator<MoveOnly>> uim;
+ std::vector<uim> v;
+ v.emplace_back(uim());
+}
+
+// Unordered containers don't use allocator_traits yet so need full
+// Allocator interface, derive from std::allocator to get it.
+template<typename T, bool R>
+struct Alloc : std::allocator<T>
+{
+ template<typename U>
+ struct rebind { typedef Alloc<U, R> other; };
+
+ Alloc() = default;
+
+ template<typename U>
+ Alloc(const Alloc<U, R>&) { }
+
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
+
+ void construct(T* p, arg_type) const
+ { new((void*)p) T(); }
+};
+
+// verify is_copy_constructible depends on allocator
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
+
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
index 3a6984c4500..9ef1c8134ac 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
@@ -2,7 +2,7 @@
// { dg-options "-std=gnu++0x" }
// { dg-require-normal-mode "" }
-// Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-error "static assertion failed" "" { target *-*-* } 185 }
+// { dg-error "static assertion failed" "" { target *-*-* } 187 }
#include <unordered_set>