svn commit: r258255 - in projects/random_number_generator: . contrib/bmake contrib/bmake/lst.lib contrib/gcc contrib/gcc/config/rs6000 contrib/gcc/cp contrib/gcc/doc contrib/gcclibs/libcpp contrib/...
Mark Murray
markm at FreeBSD.org
Sun Nov 17 10:17:02 UTC 2013
Author: markm
Date: Sun Nov 17 10:16:56 2013
New Revision: 258255
URL: http://svnweb.freebsd.org/changeset/base/258255
Log:
MFC - tracking commit.
Added:
projects/random_number_generator/sys/arm/ti/ti_mbox.c
- copied unchanged from r258254, head/sys/arm/ti/ti_mbox.c
projects/random_number_generator/sys/arm/ti/ti_mbox.h
- copied unchanged from r258254, head/sys/arm/ti/ti_mbox.h
projects/random_number_generator/sys/arm/ti/ti_pruss.c
- copied unchanged from r258254, head/sys/arm/ti/ti_pruss.c
projects/random_number_generator/sys/arm/ti/ti_pruss.h
- copied unchanged from r258254, head/sys/arm/ti/ti_pruss.h
projects/random_number_generator/sys/net/ieee_oui.h
- copied unchanged from r258254, head/sys/net/ieee_oui.h
Modified:
projects/random_number_generator/Makefile.inc1
projects/random_number_generator/contrib/bmake/hash.c
projects/random_number_generator/contrib/bmake/lst.lib/lstMember.c
projects/random_number_generator/contrib/gcc/ChangeLog.gcc43
projects/random_number_generator/contrib/gcc/c-decl.c
projects/random_number_generator/contrib/gcc/c-opts.c
projects/random_number_generator/contrib/gcc/c.opt
projects/random_number_generator/contrib/gcc/config/rs6000/rs6000.c
projects/random_number_generator/contrib/gcc/cp/cp-lang.c
projects/random_number_generator/contrib/gcc/cp/cp-tree.h
projects/random_number_generator/contrib/gcc/cp/decl.c
projects/random_number_generator/contrib/gcc/cp/tree.c
projects/random_number_generator/contrib/gcc/cp/typeck.c
projects/random_number_generator/contrib/gcc/doc/invoke.texi
projects/random_number_generator/contrib/gcc/dwarf2out.c
projects/random_number_generator/contrib/gcc/flags.h
projects/random_number_generator/contrib/gcc/langhooks-def.h
projects/random_number_generator/contrib/gcc/langhooks.h
projects/random_number_generator/contrib/gcc/opts.c
projects/random_number_generator/contrib/gcc/postreload-gcse.c
projects/random_number_generator/contrib/gcc/regs.h
projects/random_number_generator/contrib/gcc/rtlanal.c
projects/random_number_generator/contrib/gcc/tree-vrp.c
projects/random_number_generator/contrib/gcc/tree.h
projects/random_number_generator/contrib/gcclibs/libcpp/files.c
projects/random_number_generator/contrib/gcclibs/libcpp/internal.h
projects/random_number_generator/contrib/gcclibs/libcpp/lex.c
projects/random_number_generator/contrib/gperf/doc/gperf.1
projects/random_number_generator/contrib/gperf/src/options.cc
projects/random_number_generator/contrib/gperf/src/options.h
projects/random_number_generator/contrib/gperf/src/options.icc
projects/random_number_generator/contrib/gperf/src/output.cc
projects/random_number_generator/contrib/netcat/nc.1
projects/random_number_generator/contrib/netcat/netcat.c
projects/random_number_generator/etc/Makefile
projects/random_number_generator/etc/mtree/BSD.include.dist
projects/random_number_generator/etc/mtree/BSD.tests.dist
projects/random_number_generator/etc/mtree/BSD.usr.dist
projects/random_number_generator/etc/mtree/Makefile
projects/random_number_generator/etc/pkg/FreeBSD.conf
projects/random_number_generator/lib/libc/stdio/printf_l.3
projects/random_number_generator/lib/libc/stdio/scanf_l.3
projects/random_number_generator/share/i18n/esdb/UTF/UTF.alias
projects/random_number_generator/share/man/man4/pf.4
projects/random_number_generator/share/man/man4/rights.4
projects/random_number_generator/sys/amd64/amd64/machdep.c
projects/random_number_generator/sys/amd64/ia32/ia32_signal.c
projects/random_number_generator/sys/amd64/linux32/linux32_sysvec.c
projects/random_number_generator/sys/arm/arm/trap.c
projects/random_number_generator/sys/arm/econa/uart_bus_ec.c
projects/random_number_generator/sys/arm/econa/uart_cpu_ec.c
projects/random_number_generator/sys/arm/ti/files.ti
projects/random_number_generator/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c
projects/random_number_generator/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
projects/random_number_generator/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h
projects/random_number_generator/sys/dev/acpica/acpi_hpet.c
projects/random_number_generator/sys/dev/ahci/ahci.c
projects/random_number_generator/sys/dev/ahci/ahci.h
projects/random_number_generator/sys/dev/ata/ata-pci.h
projects/random_number_generator/sys/dev/ata/chipsets/ata-intel.c
projects/random_number_generator/sys/dev/bxe/bxe.c
projects/random_number_generator/sys/dev/bxe/bxe.h
projects/random_number_generator/sys/dev/bxe/bxe_elink.c
projects/random_number_generator/sys/dev/bxe/ecore_hsi.h
projects/random_number_generator/sys/dev/bxe/ecore_init.h
projects/random_number_generator/sys/dev/bxe/ecore_reg.h
projects/random_number_generator/sys/dev/bxe/ecore_sp.c
projects/random_number_generator/sys/dev/bxe/ecore_sp.h
projects/random_number_generator/sys/dev/ichsmb/ichsmb_pci.c
projects/random_number_generator/sys/dev/iwn/if_iwn.c
projects/random_number_generator/sys/dev/iwn/if_iwn_chip_cfg.h
projects/random_number_generator/sys/dev/iwn/if_iwnreg.h
projects/random_number_generator/sys/dev/nand/nand.c
projects/random_number_generator/sys/dev/nand/nand.h
projects/random_number_generator/sys/dev/nand/nand_generic.c
projects/random_number_generator/sys/dev/oce/oce_hw.h
projects/random_number_generator/sys/dev/oce/oce_sysctl.c
projects/random_number_generator/sys/dev/qlxgbe/ql_hw.c
projects/random_number_generator/sys/dev/qlxgbe/ql_hw.h
projects/random_number_generator/sys/dev/qlxgbe/ql_ioctl.c
projects/random_number_generator/sys/dev/qlxge/qls_ioctl.c
projects/random_number_generator/sys/dev/sound/pci/hda/hdac.c
projects/random_number_generator/sys/dev/sound/pci/hda/hdac.h
projects/random_number_generator/sys/dev/sound/pci/hda/hdacc.c
projects/random_number_generator/sys/dev/usb/controller/ehci_pci.c
projects/random_number_generator/sys/dev/xen/balloon/balloon.c
projects/random_number_generator/sys/geom/multipath/g_multipath.c
projects/random_number_generator/sys/geom/multipath/g_multipath.h
projects/random_number_generator/sys/i386/i386/machdep.c
projects/random_number_generator/sys/i386/include/vm86.h
projects/random_number_generator/sys/i386/linux/linux_sysvec.c
projects/random_number_generator/sys/kern/kern_event.c
projects/random_number_generator/sys/kern/subr_capability.c
projects/random_number_generator/sys/kern/sys_generic.c
projects/random_number_generator/sys/kern/uipc_mbuf.c
projects/random_number_generator/sys/kern/uipc_mqueue.c
projects/random_number_generator/sys/kern/vfs_bio.c
projects/random_number_generator/sys/net/if_gif.c
projects/random_number_generator/sys/netinet/sctp_bsd_addr.c
projects/random_number_generator/sys/netinet/sctp_indata.c
projects/random_number_generator/sys/netinet/sctp_output.c
projects/random_number_generator/sys/netinet/sctp_pcb.c
projects/random_number_generator/sys/netpfil/pf/pf_lb.c
projects/random_number_generator/sys/pc98/pc98/machdep.c
projects/random_number_generator/sys/powerpc/aim/mmu_oea64.c
projects/random_number_generator/sys/powerpc/booke/machdep.c
projects/random_number_generator/sys/powerpc/booke/pmap.c
projects/random_number_generator/sys/powerpc/fpu/fpu_emu.c
projects/random_number_generator/sys/powerpc/fpu/fpu_explode.c
projects/random_number_generator/sys/powerpc/include/counter.h
projects/random_number_generator/sys/powerpc/include/pcb.h
projects/random_number_generator/sys/powerpc/mpc85xx/mpc85xx.h
projects/random_number_generator/sys/powerpc/mpc85xx/platform_mpc85xx.c
projects/random_number_generator/sys/powerpc/powerpc/genassym.c
projects/random_number_generator/sys/powerpc/powerpc/swtch32.S
projects/random_number_generator/sys/rpc/svc.c
projects/random_number_generator/sys/sys/capability.h
projects/random_number_generator/sys/x86/include/psl.h
projects/random_number_generator/tools/regression/usr.sbin/etcupdate/fbsdid.sh
projects/random_number_generator/usr.bin/procstat/procstat_files.c
projects/random_number_generator/usr.sbin/etcupdate/etcupdate.sh
projects/random_number_generator/usr.sbin/pkg/pkg.c
projects/random_number_generator/usr.sbin/portsnap/portsnap/portsnap.sh
Directory Properties:
projects/random_number_generator/ (props changed)
projects/random_number_generator/contrib/bmake/ (props changed)
projects/random_number_generator/contrib/gcc/ (props changed)
projects/random_number_generator/contrib/netcat/ (props changed)
projects/random_number_generator/lib/libc/ (props changed)
projects/random_number_generator/share/man/man4/ (props changed)
projects/random_number_generator/sys/ (props changed)
projects/random_number_generator/sys/cddl/contrib/opensolaris/ (props changed)
projects/random_number_generator/usr.bin/procstat/ (props changed)
Modified: projects/random_number_generator/Makefile.inc1
==============================================================================
--- projects/random_number_generator/Makefile.inc1 Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/Makefile.inc1 Sun Nov 17 10:16:56 2013 (r258255)
@@ -509,7 +509,7 @@ _worldtmp:
.endif
.if ${MK_TESTS} != "no"
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
- -p ${WORLDTMP}${TESTSBASE} >/dev/null
+ -p ${WORLDTMP}/usr >/dev/null
.endif
.for _mtree in ${LOCAL_MTREE}
mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
Modified: projects/random_number_generator/contrib/bmake/hash.c
==============================================================================
--- projects/random_number_generator/contrib/bmake/hash.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/bmake/hash.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -221,6 +221,9 @@ Hash_FindEntry(Hash_Table *t, const char
unsigned h;
const char *p;
+ if (t == NULL || t->bucketPtr == NULL) {
+ return NULL;
+ }
for (h = 0, p = key; *p;)
h = (h << 5) - h + *p++;
p = key;
Modified: projects/random_number_generator/contrib/bmake/lst.lib/lstMember.c
==============================================================================
--- projects/random_number_generator/contrib/bmake/lst.lib/lstMember.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/bmake/lst.lib/lstMember.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -58,6 +58,9 @@ Lst_Member(Lst l, void *d)
List list = l;
ListNode lNode;
+ if (list == NULL) {
+ return NULL;
+ }
lNode = list->firstPtr;
if (lNode == NULL) {
return NULL;
Modified: projects/random_number_generator/contrib/gcc/ChangeLog.gcc43
==============================================================================
--- projects/random_number_generator/contrib/gcc/ChangeLog.gcc43 Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/ChangeLog.gcc43 Sun Nov 17 10:16:56 2013 (r258255)
@@ -1,9 +1,29 @@
-2007-06-05 Joerg Wunsch <j.gnu at uriah.heep.sax.de> (r23479)
+2007-06-05 Joerg Wunsch <j.gnu at uriah.heep.sax.de> (r125346)
PR preprocessor/23479
* doc/extend.texi: Document the 0b-prefixed binary integer
constant extension.
+2007-05-24 Richard Sandiford <rsandifo at nildram.co.uk> (r125037)
+
+ * postreload-gcse.c (reg_changed_after_insn_p): New function.
+ (oprs_unchanged_p): Use it to check all registers in a REG.
+ (record_opr_changes): Look for clobbers in CALL_INSN_FUNCTION_USAGE.
+ (reg_set_between_after_reload_p): Delete.
+ (reg_used_between_after_reload_p): Likewise.
+ (reg_set_or_used_since_bb_start): Likewise.
+ (eliminate_partially_redundant_load): Use reg_changed_after_insn_p
+ and reg_used_between_p instead of reg_set_or_used_since_bb_start.
+ Use reg_set_between_p instead of reg_set_between_after_reload_p.
+ * rtlanal.c (reg_set_p): Check whether REG overlaps
+ regs_invalidated_by_call, rather than just checking the
+ membership of REGNO (REG).
+
+2007-05-03 Ian Lance Taylor <iant at google.com> (r124381)
+
+ * config/rs6000/rs6000.c (rs6000_override_options): Don't set
+ MASK_PPC_GFXOPT for 8540 or 8548.
+
2007-05-01 Dwarakanath Rajagopal <dwarak.rajagopal at amd.com> (r124341)
* doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of
@@ -22,6 +42,57 @@
alignment for amdfam10 architecture. Increasing the max loop
alignment to 24 bytes.
+2007-04-16 Lawrence Crowl <crowl at google.com>
+
+ * doc/invoke.texi (Debugging Options): Add documentation for the
+ -femit-struct-debug options -femit-struct-debug-baseonly,
+ -femit-struct-debug-reduced, and
+ -femit-struct-debug-detailed[=...].
+
+ * c-opts.c (c_common_handle_option): Add
+ OPT_femit_struct_debug_baseonly, OPT_femit_struct_debug_reduced,
+ and OPT_femit_struct_debug_detailed_.
+ * c.opt: Add specifications for
+ -femit-struct-debug-baseonly, -femit-struct-debug-reduced,
+ and -femit-struct-debug-detailed[=...].
+ * opts.c (set_struct_debug_option): Parse the
+ -femit-struct-debug-... options.
+ * opts.c (matches_main_base, main_input_basename,
+ main_input_baselength, base_of_path, matches_main_base): Add
+ variables and functions to compare header base name to compilation
+ unit base name.
+ * opts.c (should_emit_struct_debug): Add to determine to emit a
+ structure based on the option.
+ (dump_struct_debug) Also disabled function to debug this
+ function.
+ * opts.c (handle_options): Save the base name of the
+ compilation unit.
+
+ * langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define.
+ (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add.
+ This hook indicates if a type is generic. Set it by default
+ to "never generic".
+ * langhooks.h (struct lang_hooks_for_types): Add a new hook
+ to determine if a struct type is generic or not.
+ * cp/cp-tree.h (class_tmpl_impl_spec_p): Declare a C++ hook.
+ * cp/tree.c (class_tmpl_impl_spec_p): Implement the C++ hook.
+ * cp/cp-lang.c (LANG_HOOKS_GENERIC_TYPE_P): Override null C hook
+ with live C++ hook.
+
+ * flags.h (enum debug_info_usage): Add an enumeration to describe
+ a program's use of a structure type.
+ * dwarf2out.c (gen_struct_or_union_type_die): Add a new parameter
+ to indicate the program's usage of the type. Filter structs based
+ on the -femit-struct-debug-... specification.
+ (gen_type_die): Split into two routines, gen_type_die and
+ gen_type_die_with_usage. gen_type_die is now a wrapper
+ that assumes direct usage.
+ (gen_type_die_with_usage): Replace calls to gen_type_die
+ with gen_type_die_with_usage adding the program usage of
+ the referenced type.
+ (dwarf2out_imported_module_or_decl): Suppress struct debug
+ information using should_emit_struct_debug when appropriate.
+
2007-04-12 Richard Guenther <rguenther at suse.de> (r123736)
PR tree-optimization/24689
@@ -44,6 +115,19 @@
* config/i386/i386.c (override_options): Likewise.
* doc/invoke.texi: Likewise.
+2007-03-12 Seongbae Park <seongbae.park at gmail.com>
+
+ * c-decl.c (warn_variable_length_array): New function.
+ Refactored from grokdeclarator to handle warn_vla
+ and handle unnamed array case.
+ (grokdeclarator): Refactored VLA warning case.
+ * c.opt (Wvla): New flag.
+
+2007-03-11 Ian Lance Taylor <iant at google.com> (r122831 - partial)
+
+ * tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and
+ the *_DIV_EXPR codes correctly with overflow infinities.
+
2007-02-09 Dwarakanath Rajagopal <dwarak.rajagopal at amd.com> (r121763)
* config/i386/driver-i386.c: Turn on -mtune=native for AMDFAM10.
Modified: projects/random_number_generator/contrib/gcc/c-decl.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/c-decl.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/c-decl.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -3931,6 +3931,61 @@ check_bitfield_type_and_width (tree *typ
}
+
+/* Print warning about variable length array if necessary. */
+
+static void
+warn_variable_length_array (const char *name, tree size)
+{
+ int ped = !flag_isoc99 && pedantic && warn_vla != 0;
+ int const_size = TREE_CONSTANT (size);
+
+ if (ped)
+ {
+ if (const_size)
+ {
+ if (name)
+ pedwarn ("ISO C90 forbids array %qs whose size "
+ "can%'t be evaluated",
+ name);
+ else
+ pedwarn ("ISO C90 forbids array whose size "
+ "can%'t be evaluated");
+ }
+ else
+ {
+ if (name)
+ pedwarn ("ISO C90 forbids variable length array %qs",
+ name);
+ else
+ pedwarn ("ISO C90 forbids variable length array");
+ }
+ }
+ else if (warn_vla > 0)
+ {
+ if (const_size)
+ {
+ if (name)
+ warning (OPT_Wvla,
+ "the size of array %qs can"
+ "%'t be evaluated", name);
+ else
+ warning (OPT_Wvla,
+ "the size of array can %'t be evaluated");
+ }
+ else
+ {
+ if (name)
+ warning (OPT_Wvla,
+ "variable length array %qs is used",
+ name);
+ else
+ warning (OPT_Wvla,
+ "variable length array is used");
+ }
+ }
+}
+
/* Given declspecs and a declarator,
determine the name and type of the object declared
and construct a ..._DECL node for it.
@@ -4329,17 +4384,7 @@ grokdeclarator (const struct c_declarato
nonconstant even if it is (eg) a const variable
with known value. */
size_varies = 1;
-
- if (!flag_isoc99 && pedantic)
- {
- if (TREE_CONSTANT (size))
- pedwarn ("ISO C90 forbids array %qs whose size "
- "can%'t be evaluated",
- name);
- else
- pedwarn ("ISO C90 forbids variable-size array %qs",
- name);
- }
+ warn_variable_length_array (orig_name, size);
if (warn_variable_decl)
warning (0, "variable-sized array %qs", name);
}
Modified: projects/random_number_generator/contrib/gcc/c-opts.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/c-opts.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/c-opts.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -818,6 +818,18 @@ c_common_handle_option (size_t scode, co
flag_gen_declaration = 1;
break;
+ case OPT_femit_struct_debug_baseonly:
+ set_struct_debug_option ("base");
+ break;
+
+ case OPT_femit_struct_debug_reduced:
+ set_struct_debug_option ("dir:ord:sys,dir:gen:any,ind:base");
+ break;
+
+ case OPT_femit_struct_debug_detailed_:
+ set_struct_debug_option (arg);
+ break;
+
case OPT_idirafter:
add_path (xstrdup (arg), AFTER, 0, true);
break;
Modified: projects/random_number_generator/contrib/gcc/c.opt
==============================================================================
--- projects/random_number_generator/contrib/gcc/c.opt Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/c.opt Sun Nov 17 10:16:56 2013 (r258255)
@@ -432,6 +432,10 @@ Wvariadic-macros
C ObjC C++ ObjC++
Do not warn about using variadic macros when -pedantic
+Wvla
+C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
+Warn if a variable length array is used
+
Wwrite-strings
C ObjC C++ ObjC++ Var(warn_write_strings)
In C++, nonzero means warn about deprecated conversion from string literals to `char *'. In C, similar warning, except that the conversion is of course not deprecated by the ISO C standard.
@@ -761,6 +765,18 @@ gen-decls
ObjC ObjC++
Dump declarations to a .decl file
+femit-struct-debug-baseonly
+C ObjC C++ ObjC++
+-femit-struct-debug-baseonly Aggressive reduced debug info for structs
+
+femit-struct-debug-reduced
+C ObjC C++ ObjC++
+-femit-struct-debug-reduced Conservative reduced debug info for structs
+
+femit-struct-debug-detailed=
+C ObjC C++ ObjC++ Joined
+-femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs
+
idirafter
C ObjC C++ ObjC++ Joined Separate
-idirafter <dir> Add <dir> to the end of the system include path
Modified: projects/random_number_generator/contrib/gcc/config/rs6000/rs6000.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/config/rs6000/rs6000.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/config/rs6000/rs6000.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -1171,11 +1171,9 @@ rs6000_override_options (const char *def
{"801", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
{"821", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
{"823", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
- {"8540", PROCESSOR_PPC8540,
- POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_STRICT_ALIGN},
+ {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
/* 8548 has a dummy entry for now. */
- {"8548", PROCESSOR_PPC8540,
- POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_STRICT_ALIGN},
+ {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
{"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
{"970", PROCESSOR_POWER4,
POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
Modified: projects/random_number_generator/contrib/gcc/cp/cp-lang.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/cp/cp-lang.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/cp/cp-lang.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -44,6 +44,8 @@ static void cp_init_ts (void);
#define LANG_HOOKS_NAME "GNU C++"
#undef LANG_HOOKS_INIT
#define LANG_HOOKS_INIT cxx_init
+#undef LANG_HOOKS_GENERIC_TYPE_P
+#define LANG_HOOKS_GENERIC_TYPE_P class_tmpl_impl_spec_p
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
#define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name
#undef LANG_HOOKS_FOLD_OBJ_TYPE_REF
Modified: projects/random_number_generator/contrib/gcc/cp/cp-tree.h
==============================================================================
--- projects/random_number_generator/contrib/gcc/cp/cp-tree.h Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/cp/cp-tree.h Sun Nov 17 10:16:56 2013 (r258255)
@@ -4373,6 +4373,7 @@ extern tree add_stmt_to_compound (tree,
extern tree cxx_maybe_build_cleanup (tree);
extern void init_tree (void);
extern int pod_type_p (tree);
+extern bool class_tmpl_impl_spec_p (tree);
extern int zero_init_p (tree);
extern tree canonical_type_variant (tree);
extern tree copy_binfo (tree, tree, tree,
Modified: projects/random_number_generator/contrib/gcc/cp/decl.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/cp/decl.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/cp/decl.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -6702,12 +6702,21 @@ compute_array_index_type (tree name, tre
error ("size of array is not an integral constant-expression");
size = integer_one_node;
}
- else if (pedantic)
+ else if (pedantic && warn_vla != 0)
{
if (name)
- pedwarn ("ISO C++ forbids variable-size array %qD", name);
+ pedwarn ("ISO C++ forbids variable length array %qD", name);
else
- pedwarn ("ISO C++ forbids variable-size array");
+ pedwarn ("ISO C++ forbids variable length array");
+ }
+ else if (warn_vla > 0)
+ {
+ if (name)
+ warning (OPT_Wvla,
+ "variable length array %qD is used", name);
+ else
+ warning (OPT_Wvla,
+ "variable length array is used");
}
if (processing_template_decl && !TREE_CONSTANT (size))
Modified: projects/random_number_generator/contrib/gcc/cp/tree.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/cp/tree.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/cp/tree.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -1762,6 +1762,14 @@ pod_type_p (tree t)
return 1;
}
+/* Nonzero iff type T is a class template implicit specialization. */
+
+bool
+class_tmpl_impl_spec_p (tree t)
+{
+ return CLASS_TYPE_P (t) && CLASSTYPE_TEMPLATE_INSTANTIATION (t);
+}
+
/* Returns 1 iff zero initialization of type T means actually storing
zeros in it. */
Modified: projects/random_number_generator/contrib/gcc/cp/typeck.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/cp/typeck.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/cp/typeck.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -3773,6 +3773,12 @@ build_binary_op (enum tree_code code, tr
result = fold_if_not_in_template (result);
if (final_type != 0)
result = cp_convert (final_type, result);
+
+ if (TREE_OVERFLOW_P (result)
+ && !TREE_OVERFLOW_P (op0)
+ && !TREE_OVERFLOW_P (op1))
+ overflow_warning (result);
+
return result;
}
Modified: projects/random_number_generator/contrib/gcc/doc/invoke.texi
==============================================================================
--- projects/random_number_generator/contrib/gcc/doc/invoke.texi Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/doc/invoke.texi Sun Nov 17 10:16:56 2013 (r258255)
@@ -230,7 +230,8 @@ in the following sections.
-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
--Wunused-value -Wunused-variable -Wvariadic-macros @gol
+-Wunused-value -Wunused-variable @gol
+-Wvariadic-macros -Wvla @gol
-Wvolatile-register-var -Wwrite-strings}
@item C-only Warning Options
@@ -274,6 +275,8 @@ in the following sections.
-ftest-coverage -ftime-report -fvar-tracking @gol
-g -g at var{level} -gcoff -gdwarf-2 @gol
-ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
+-femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
+-femit-struct-debug-detailed at r{[}=@var{spec-list}@r{]} @gol
-p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
-print-multi-directory -print-multi-lib @gol
-print-prog-name=@var{program} -print-search-dirs -Q @gol
@@ -3201,6 +3204,13 @@ Warn if variadic macros are used in peda
alternate syntax when in pedantic ISO C99 mode. This is default.
To inhibit the warning messages, use @option{-Wno-variadic-macros}.
+ at item -Wvla
+ at opindex Wvla
+ at opindex Wno-vla
+Warn if variable length array is used in the code.
+ at option{-Wno-vla} will prevent the @option{-pedantic} warning of
+the variable length array.
+
@item -Wvolatile-register-var
@opindex Wvolatile-register-var
@opindex Wno-volatile-register-var
@@ -3403,6 +3413,78 @@ Compress DWARF2 debugging information by
information about each symbol. This option only makes sense when
generating DWARF2 debugging information with @option{-gdwarf-2}.
+ at item -femit-struct-debug-baseonly
+Emit debug information for struct-like types
+only when the base name of the compilation source file
+matches the base name of file in which the struct was defined.
+
+This option substantially reduces the size of debugging information,
+but at significant potential loss in type information to the debugger.
+See @option{-femit-struct-debug-reduced} for a less aggressive option.
+See @option{-femit-struct-debug-detailed} for more detailed control.
+
+This option works only with DWARF 2.
+
+ at item -femit-struct-debug-reduced
+Emit debug information for struct-like types
+only when the base name of the compilation source file
+matches the base name of file in which the type was defined,
+unless the struct is a template or defined in a system header.
+
+This option significantly reduces the size of debugging information,
+with some potential loss in type information to the debugger.
+See @option{-femit-struct-debug-baseonly} for a more aggressive option.
+See @option{-femit-struct-debug-detailed} for more detailed control.
+
+This option works only with DWARF 2.
+
+ at item -femit-struct-debug-detailed at r{[}=@var{spec-list}@r{]}
+Specify the struct-like types
+for which the compiler will generate debug information.
+The intent is to reduce duplicate struct debug information
+between different object files within the same program.
+
+This option is a detailed version of
+ at option{-femit-struct-debug-reduced} and @option{-femit-struct-debug-baseonly},
+which will serve for most needs.
+
+A specification has the syntax
+[@samp{dir:}|@samp{ind:}][@samp{ord:}|@samp{gen:}](@samp{any}|@samp{sys}|@samp{base}|@samp{none})
+
+The optional first word limits the specification to
+structs that are used directly (@samp{dir:}) or used indirectly (@samp{ind:}).
+A struct type is used directly when it is the type of a variable, member.
+Indirect uses arise through pointers to structs.
+That is, when use of an incomplete struct would be legal, the use is indirect.
+An example is
+ at samp{struct one direct; struct two * indirect;}.
+
+The optional second word limits the specification to
+ordinary structs (@samp{ord:}) or generic structs (@samp{gen:}).
+Generic structs are a bit complicated to explain.
+For C++, these are non-explicit specializations of template classes,
+or non-template classes within the above.
+Other programming languages have generics,
+but @samp{-femit-struct-debug-detailed} does not yet implement them.
+
+The third word specifies the source files for those
+structs for which the compiler will emit debug information.
+The values @samp{none} and @samp{any} have the normal meaning.
+The value @samp{base} means that
+the base of name of the file in which the type declaration appears
+must match the base of the name of the main compilation file.
+In practice, this means that
+types declared in @file{foo.c} and @file{foo.h} will have debug information,
+but types declared in other header will not.
+The value @samp{sys} means those types satisfying @samp{base}
+or declared in system or compiler headers.
+
+You may need to experiment to determine the best settings for your application.
+
+The default is @samp{-femit-struct-debug-detailed=all}.
+
+This option works only with DWARF 2.
+
@cindex @command{prof}
@item -p
@opindex p
Modified: projects/random_number_generator/contrib/gcc/dwarf2out.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/dwarf2out.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/dwarf2out.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -4215,7 +4215,8 @@ static void gen_ptr_to_mbr_type_die (tre
static dw_die_ref gen_compile_unit_die (const char *);
static void gen_inheritance_die (tree, tree, dw_die_ref);
static void gen_member_die (tree, dw_die_ref);
-static void gen_struct_or_union_type_die (tree, dw_die_ref);
+static void gen_struct_or_union_type_die (tree, dw_die_ref,
+ enum debug_info_usage);
static void gen_subroutine_type_die (tree, dw_die_ref);
static void gen_typedef_die (tree, dw_die_ref);
static void gen_type_die (tree, dw_die_ref);
@@ -12473,7 +12474,8 @@ gen_member_die (tree type, dw_die_ref co
member DIEs needed by later specification DIEs. */
static void
-gen_struct_or_union_type_die (tree type, dw_die_ref context_die)
+gen_struct_or_union_type_die (tree type, dw_die_ref context_die,
+ enum debug_info_usage usage)
{
dw_die_ref type_die = lookup_type_die (type);
dw_die_ref scope_die = 0;
@@ -12482,6 +12484,7 @@ gen_struct_or_union_type_die (tree type,
&& (! TYPE_STUB_DECL (type)
|| ! TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type))));
int ns_decl = (context_die && context_die->die_tag == DW_TAG_namespace);
+ complete = complete && should_emit_struct_debug (type, usage);
if (type_die && ! complete)
return;
@@ -12609,7 +12612,8 @@ gen_typedef_die (tree decl, dw_die_ref c
/* Generate a type description DIE. */
static void
-gen_type_die (tree type, dw_die_ref context_die)
+gen_type_die_with_usage (tree type, dw_die_ref context_die,
+ enum debug_info_usage usage)
{
int need_pop;
@@ -12657,16 +12661,19 @@ gen_type_die (tree type, dw_die_ref cont
/* For these types, all that is required is that we output a DIE (or a
set of DIEs) to represent the "basis" type. */
- gen_type_die (TREE_TYPE (type), context_die);
+ gen_type_die_with_usage (TREE_TYPE (type), context_die,
+ DINFO_USAGE_IND_USE);
break;
case OFFSET_TYPE:
/* This code is used for C++ pointer-to-data-member types.
Output a description of the relevant class type. */
- gen_type_die (TYPE_OFFSET_BASETYPE (type), context_die);
+ gen_type_die_with_usage (TYPE_OFFSET_BASETYPE (type), context_die,
+ DINFO_USAGE_IND_USE);
/* Output a description of the type of the object pointed to. */
- gen_type_die (TREE_TYPE (type), context_die);
+ gen_type_die_with_usage (TREE_TYPE (type), context_die,
+ DINFO_USAGE_IND_USE);
/* Now output a DIE to represent this pointer-to-data-member type
itself. */
@@ -12675,13 +12682,15 @@ gen_type_die (tree type, dw_die_ref cont
case FUNCTION_TYPE:
/* Force out return type (in case it wasn't forced out already). */
- gen_type_die (TREE_TYPE (type), context_die);
+ gen_type_die_with_usage (TREE_TYPE (type), context_die,
+ DINFO_USAGE_DIR_USE);
gen_subroutine_type_die (type, context_die);
break;
case METHOD_TYPE:
/* Force out return type (in case it wasn't forced out already). */
- gen_type_die (TREE_TYPE (type), context_die);
+ gen_type_die_with_usage (TREE_TYPE (type), context_die,
+ DINFO_USAGE_DIR_USE);
gen_subroutine_type_die (type, context_die);
break;
@@ -12707,7 +12716,7 @@ gen_type_die (tree type, dw_die_ref cont
&& AGGREGATE_TYPE_P (TYPE_CONTEXT (type))
&& ! TREE_ASM_WRITTEN (TYPE_CONTEXT (type)))
{
- gen_type_die (TYPE_CONTEXT (type), context_die);
+ gen_type_die_with_usage (TYPE_CONTEXT (type), context_die, usage);
if (TREE_ASM_WRITTEN (type))
return;
@@ -12731,7 +12740,7 @@ gen_type_die (tree type, dw_die_ref cont
gen_enumeration_type_die (type, context_die);
}
else
- gen_struct_or_union_type_die (type, context_die);
+ gen_struct_or_union_type_die (type, context_die, usage);
if (need_pop)
pop_decl_scope ();
@@ -12760,6 +12769,12 @@ gen_type_die (tree type, dw_die_ref cont
TREE_ASM_WRITTEN (type) = 1;
}
+static void
+gen_type_die (tree type, dw_die_ref context_die)
+{
+ gen_type_die_with_usage (type, context_die, DINFO_USAGE_DIR_USE);
+}
+
/* Generate a DIE for a tagged type instantiation. */
static void
@@ -13357,7 +13372,11 @@ dwarf2out_imported_module_or_decl (tree
if (!context)
scope_die = comp_unit_die;
else if (TYPE_P (context))
+ {
+ if (!should_emit_struct_debug (context, DINFO_USAGE_DIR_USE))
+ return;
scope_die = force_type_die (context);
+ }
else
scope_die = force_decl_die (context);
@@ -13383,7 +13402,12 @@ dwarf2out_imported_module_or_decl (tree
if (TYPE_CONTEXT (type))
if (TYPE_P (TYPE_CONTEXT (type)))
+ {
+ if (!should_emit_struct_debug (TYPE_CONTEXT (type),
+ DINFO_USAGE_DIR_USE))
+ return;
type_context_die = force_type_die (TYPE_CONTEXT (type));
+ }
else
type_context_die = force_decl_die (TYPE_CONTEXT (type));
else
Modified: projects/random_number_generator/contrib/gcc/flags.h
==============================================================================
--- projects/random_number_generator/contrib/gcc/flags.h Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/flags.h Sun Nov 17 10:16:56 2013 (r258255)
@@ -23,6 +23,7 @@ Software Foundation, 51 Franklin Street,
#ifndef GCC_FLAGS_H
#define GCC_FLAGS_H
+#include "coretypes.h"
#include "options.h"
enum debug_info_type
@@ -54,6 +55,25 @@ enum debug_info_level
/* Specify how much debugging info to generate. */
extern enum debug_info_level debug_info_level;
+/* A major contribution to object and executable size is debug
+ information size. A major contribution to debug information
+ size is struct descriptions replicated in several object files.
+ The following function determines whether or not debug information
+ should be generated for a given struct. The indirect parameter
+ indicates that the struct is being handled indirectly, via
+ a pointer. See opts.c for the implementation. */
+
+enum debug_info_usage
+{
+ DINFO_USAGE_DFN, /* A struct definition. */
+ DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */
+ DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */
+ DINFO_USAGE_NUM_ENUMS /* The number of enumerators. */
+};
+
+extern bool should_emit_struct_debug (tree type_decl, enum debug_info_usage);
+extern void set_struct_debug_option (const char *value);
+
/* Nonzero means use GNU-only extensions in the generated symbolic
debugging information. */
extern bool use_gnu_debug_info_extensions;
Modified: projects/random_number_generator/contrib/gcc/langhooks-def.h
==============================================================================
--- projects/random_number_generator/contrib/gcc/langhooks-def.h Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/langhooks-def.h Sun Nov 17 10:16:56 2013 (r258255)
@@ -217,6 +217,7 @@ extern tree lhd_make_node (enum tree_cod
so we create a compile-time error instead. */
#define LANG_HOOKS_MAKE_TYPE lhd_make_node
#define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error
+#define LANG_HOOKS_GENERIC_TYPE_P hook_bool_tree_false
#define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
#define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type
#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
@@ -231,6 +232,7 @@ extern tree lhd_make_node (enum tree_cod
LANG_HOOKS_UNSIGNED_TYPE, \
LANG_HOOKS_SIGNED_TYPE, \
LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, \
+ LANG_HOOKS_GENERIC_TYPE_P, \
LANG_HOOKS_TYPE_PROMOTES_TO, \
LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
Modified: projects/random_number_generator/contrib/gcc/langhooks.h
==============================================================================
--- projects/random_number_generator/contrib/gcc/langhooks.h Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/langhooks.h Sun Nov 17 10:16:56 2013 (r258255)
@@ -119,6 +119,10 @@ struct lang_hooks_for_types
according to UNSIGNEDP. */
tree (*signed_or_unsigned_type) (int, tree);
+ /* True if the type is an instantiation of a generic type,
+ e.g. C++ template implicit specializations. */
+ bool (*generic_p) (tree);
+
/* Given a type, apply default promotions to unnamed function
arguments and return the new type. Return the same type if no
change. Required by any language that supports variadic
Modified: projects/random_number_generator/contrib/gcc/opts.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/opts.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/opts.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -79,6 +79,256 @@ enum debug_info_type write_symbols = NO_
the definitions of the different possible levels. */
enum debug_info_level debug_info_level = DINFO_LEVEL_NONE;
+/* A major contribution to object and executable size is debug
+ information size. A major contribution to debug information size
+ is struct descriptions replicated in several object files. The
+ following flags attempt to reduce this information. The basic
+ idea is to not emit struct debugging information in the current
+ compilation unit when that information will be generated by
+ another compilation unit.
+
+ Debug information for a struct defined in the current source
+ file should be generated in the object file. Likewise the
+ debug information for a struct defined in a header should be
+ generated in the object file of the corresponding source file.
+ Both of these case are handled when the base name of the file of
+ the struct definition matches the base name of the source file
+ of thet current compilation unit. This matching emits minimal
+ struct debugging information.
+
+ The base file name matching rule above will fail to emit debug
+ information for structs defined in system headers. So a second
+ category of files includes system headers in addition to files
+ with matching bases.
+
+ The remaining types of files are library headers and application
+ headers. We cannot currently distinguish these two types. */
+
+enum debug_struct_file
+{
+ DINFO_STRUCT_FILE_NONE, /* Debug no structs. */
+ DINFO_STRUCT_FILE_BASE, /* Debug structs defined in files with the
+ same base name as the compilation unit. */
+ DINFO_STRUCT_FILE_SYS, /* Also debug structs defined in system
+ header files. */
+ DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */
+};
+
+/* Generic structs (e.g. templates not explicitly specialized)
+ may not have a compilation unit associated with them, and so
+ may need to be treated differently from ordinary structs.
+
+ Structs only handled by reference (indirectly), will also usually
+ not need as much debugging information. */
+
+static enum debug_struct_file debug_struct_ordinary[DINFO_USAGE_NUM_ENUMS]
+ = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY };
+static enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS]
+ = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY };
+
+/* Parse the -femit-struct-debug-detailed option value
+ and set the flag variables. */
+
+#define MATCH( prefix, string ) \
+ ((strncmp (prefix, string, sizeof prefix - 1) == 0) \
+ ? ((string += sizeof prefix - 1), 1) : 0)
+
+void
+set_struct_debug_option (const char *spec)
+{
+ /* various labels for comparison */
+ static char dfn_lbl[] = "dfn:", dir_lbl[] = "dir:", ind_lbl[] = "ind:";
+ static char ord_lbl[] = "ord:", gen_lbl[] = "gen:";
+ static char none_lbl[] = "none", any_lbl[] = "any";
+ static char base_lbl[] = "base", sys_lbl[] = "sys";
+
+ enum debug_struct_file files = DINFO_STRUCT_FILE_ANY;
+ /* Default is to apply to as much as possible. */
+ enum debug_info_usage usage = DINFO_USAGE_NUM_ENUMS;
+ int ord = 1, gen = 1;
+
+ /* What usage? */
+ if (MATCH (dfn_lbl, spec))
+ usage = DINFO_USAGE_DFN;
+ else if (MATCH (dir_lbl, spec))
+ usage = DINFO_USAGE_DIR_USE;
+ else if (MATCH (ind_lbl, spec))
+ usage = DINFO_USAGE_IND_USE;
+
+ /* Generics or not? */
+ if (MATCH (ord_lbl, spec))
+ gen = 0;
+ else if (MATCH (gen_lbl, spec))
+ ord = 0;
+
+ /* What allowable environment? */
+ if (MATCH (none_lbl, spec))
+ files = DINFO_STRUCT_FILE_NONE;
+ else if (MATCH (any_lbl, spec))
+ files = DINFO_STRUCT_FILE_ANY;
+ else if (MATCH (sys_lbl, spec))
+ files = DINFO_STRUCT_FILE_SYS;
+ else if (MATCH (base_lbl, spec))
+ files = DINFO_STRUCT_FILE_BASE;
+ else
+ error ("argument %qs to %<-femit-struct-debug-detailed%> not recognized",
+ spec);
+
+ /* Effect the specification. */
+ if (usage == DINFO_USAGE_NUM_ENUMS)
+ {
+ if (ord)
+ {
+ debug_struct_ordinary[DINFO_USAGE_DFN] = files;
+ debug_struct_ordinary[DINFO_USAGE_DIR_USE] = files;
+ debug_struct_ordinary[DINFO_USAGE_IND_USE] = files;
+ }
+ if (gen)
+ {
+ debug_struct_generic[DINFO_USAGE_DFN] = files;
+ debug_struct_generic[DINFO_USAGE_DIR_USE] = files;
+ debug_struct_generic[DINFO_USAGE_IND_USE] = files;
+ }
+ }
+ else
+ {
+ if (ord)
+ debug_struct_ordinary[usage] = files;
+ if (gen)
+ debug_struct_generic[usage] = files;
+ }
+
+ if (*spec == ',')
+ set_struct_debug_option (spec+1);
+ else
+ {
+ /* No more -femit-struct-debug-detailed specifications.
+ Do final checks. */
+ if (*spec != '\0')
+ error ("argument %qs to %<-femit-struct-debug-detailed%> unknown",
+ spec);
+ if (debug_struct_ordinary[DINFO_USAGE_DIR_USE]
+ < debug_struct_ordinary[DINFO_USAGE_IND_USE]
+ || debug_struct_generic[DINFO_USAGE_DIR_USE]
+ < debug_struct_generic[DINFO_USAGE_IND_USE])
+ error ("%<-femit-struct-debug-detailed=dir:...%> must allow at least"
+ " as much as %<-femit-struct-debug-detailed=ind:...%>");
+ }
+}
+
+/* Find the base name of a path, stripping off both directories and
+ a single final extension. */
+static int
+base_of_path (const char *path, const char **base_out)
+{
+ const char *base = path;
+ const char *dot = 0;
+ const char *p = path;
+ char c = *p;
+ while (c)
+ {
+ if (IS_DIR_SEPARATOR(c))
+ {
+ base = p + 1;
+ dot = 0;
+ }
+ else if (c == '.')
+ dot = p;
+ c = *++p;
+ }
+ if (!dot)
+ dot = p;
+ *base_out = base;
+ return dot - base;
+}
+
+/* Match the base name of a file to the base name of a compilation unit. */
+
+static const char *main_input_basename;
+static int main_input_baselength;
+
+static int
+matches_main_base (const char *path)
+{
+ /* Cache the last query. */
+ static const char *last_path = NULL;
+ static int last_match = 0;
+ if (path != last_path)
+ {
+ const char *base;
+ int length = base_of_path (path, &base);
+ last_path = path;
+ last_match = (length == main_input_baselength
+ && memcmp (base, main_input_basename, length) == 0);
+ }
+ return last_match;
+}
+
+#ifdef DEBUG_DEBUG_STRUCT
+
+static int
+dump_struct_debug (tree type, enum debug_info_usage usage,
+ enum debug_struct_file criterion, int generic,
+ int matches, int result)
+{
+ /* Find the type name. */
+ tree type_decl = TYPE_STUB_DECL (type);
+ tree t = type_decl;
+ const char *name = 0;
+ if (TREE_CODE (t) == TYPE_DECL)
+ t = DECL_NAME (t);
+ if (t)
+ name = IDENTIFIER_POINTER (t);
+
+ fprintf (stderr, " struct %d %s %s %s %s %d %p %s\n",
+ criterion,
+ DECL_IN_SYSTEM_HEADER (type_decl) ? "sys" : "usr",
+ matches ? "bas" : "hdr",
+ generic ? "gen" : "ord",
+ usage == DINFO_USAGE_DFN ? ";" :
+ usage == DINFO_USAGE_DIR_USE ? "." : "*",
+ result,
+ (void*) type_decl, name);
+ return result;
+}
+#define DUMP_GSTRUCT(type, usage, criterion, generic, matches, result) \
+ dump_struct_debug (type, usage, criterion, generic, matches, result)
+
+#else
+
+#define DUMP_GSTRUCT(type, usage, criterion, generic, matches, result) \
+ (result)
+
+#endif
+
+
+bool
+should_emit_struct_debug (tree type, enum debug_info_usage usage)
+{
+ enum debug_struct_file criterion;
+ tree type_decl;
+ bool generic = lang_hooks.types.generic_p (type);
+
+ if (generic)
+ criterion = debug_struct_generic[usage];
+ else
+ criterion = debug_struct_ordinary[usage];
+
+ if (criterion == DINFO_STRUCT_FILE_NONE)
+ return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
+ if (criterion == DINFO_STRUCT_FILE_ANY)
+ return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
+
+ type_decl = TYPE_STUB_DECL (type);
+
+ if (criterion == DINFO_STRUCT_FILE_SYS && DECL_IN_SYSTEM_HEADER (type_decl))
+ return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
+
+ if (matches_main_base (DECL_SOURCE_FILE (type_decl)))
+ return DUMP_GSTRUCT (type, usage, criterion, generic, true, true);
+ return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
+}
+
/* Nonzero means use GNU-only extensions in the generated symbolic
debugging information. Currently, this only has an effect when
write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG. */
@@ -370,7 +620,11 @@ handle_options (unsigned int argc, const
if (opt[0] != '-' || opt[1] == '\0')
{
if (main_input_filename == NULL)
+ {
main_input_filename = opt;
+ main_input_baselength
+ = base_of_path (main_input_filename, &main_input_basename);
+ }
add_input_filename (opt);
n = 1;
continue;
Modified: projects/random_number_generator/contrib/gcc/postreload-gcse.c
==============================================================================
--- projects/random_number_generator/contrib/gcc/postreload-gcse.c Sun Nov 17 06:50:41 2013 (r258254)
+++ projects/random_number_generator/contrib/gcc/postreload-gcse.c Sun Nov 17 10:16:56 2013 (r258255)
@@ -197,8 +197,6 @@ static void dump_hash_table (FILE *);
static bool reg_killed_on_edge (rtx, edge);
static bool reg_used_on_edge (rtx, edge);
-static rtx reg_set_between_after_reload_p (rtx, rtx, rtx);
-static rtx reg_used_between_after_reload_p (rtx, rtx, rtx);
static rtx get_avail_load_store_reg (rtx);
static bool bb_has_well_behaved_predecessors (basic_block);
@@ -470,6 +468,22 @@ dump_hash_table (FILE *file)
fprintf (file, "\n");
}
+/* Return true if register X is recorded as being set by an instruction
+ whose CUID is greater than the one given. */
+
+static bool
+reg_changed_after_insn_p (rtx x, int cuid)
+{
+ unsigned int regno, end_regno;
+
+ regno = REGNO (x);
+ end_regno = END_HARD_REGNO (x);
+ do
+ if (reg_avail_info[regno] > cuid)
+ return true;
+ while (++regno < end_regno);
+ return false;
+}
/* Return nonzero if the operands of expression X are unchanged
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list