4.4.2-25
This commit is contained in:
parent
6e98f300dc
commit
1fd246efa8
@ -1,2 +1,2 @@
|
||||
fastjar-0.97.tar.gz
|
||||
gcc-4.4.2-20091222.tar.bz2
|
||||
gcc-4.4.2-20100114.tar.bz2
|
||||
|
59
gcc.spec
59
gcc.spec
@ -1,9 +1,9 @@
|
||||
%global DATE 20091222
|
||||
%global SVNREV 155395
|
||||
%global DATE 20100114
|
||||
%global SVNREV 155909
|
||||
%global gcc_version 4.4.2
|
||||
# Note, gcc_release must be integer, if you want to add suffixes to
|
||||
# %{release}, append them after %{gcc_release} on Release: line.
|
||||
%global gcc_release 20
|
||||
%global gcc_release 25
|
||||
%global _unpackaged_files_terminate_build 0
|
||||
%global multilib_64_archs sparc64 ppc64 s390x x86_64
|
||||
%if 0%{?fedora} >= 13
|
||||
@ -165,6 +165,10 @@ Patch16: gcc44-unwind-debug-hook.patch
|
||||
Patch17: gcc44-pr38757.patch
|
||||
Patch18: gcc44-libstdc++-docs.patch
|
||||
Patch19: gcc44-ppc64-aixdesc.patch
|
||||
Patch20: gcc44-max-vartrack-size.patch
|
||||
Patch21: gcc44-pr42657.patch
|
||||
Patch22: gcc44-pr42608.patch
|
||||
Patch23: gcc44-pr42674.patch
|
||||
|
||||
Patch1000: fastjar-0.97-segfault.patch
|
||||
Patch1001: fastjar-0.97-len1.patch
|
||||
@ -473,6 +477,10 @@ which are required to compile with the GNAT.
|
||||
%patch18 -p0 -b .libstdc++-docs~
|
||||
%endif
|
||||
%patch19 -p0 -b .ppc64-aixdesc~
|
||||
%patch20 -p0 -b .max-vartrack-size~
|
||||
%patch21 -p0 -b .pr42657~
|
||||
%patch22 -p0 -b .pr42608~
|
||||
%patch23 -p0 -b .pr42674~
|
||||
|
||||
# This testcase doesn't compile.
|
||||
rm libjava/testsuite/libjava.lang/PR35020*
|
||||
@ -1862,6 +1870,51 @@ fi
|
||||
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
|
||||
|
||||
%changelog
|
||||
* Thu Jan 14 2010 Jakub Jelinek <jakub@redhat.com> 4.4.2-25
|
||||
- update from gcc-4_4-branch
|
||||
- PRs c/42721, middle-end/40281, middle-end/42667, rtl-optimization/42699
|
||||
- re-add --param max-vartrack-size patch, but this time with default 50mil
|
||||
instead of 5mil (#531218, #548826)
|
||||
- don't emit -Wreturn-type warnings in noreturn functions
|
||||
(PR middle-end/42674)
|
||||
- march=native fixes for ix86/x86_64
|
||||
|
||||
* Tue Jan 12 2010 Jakub Jelinek <jakub@redhat.com> 4.4.2-24
|
||||
- update from gcc-4_4-branch
|
||||
- PRs debug/42662, libjava/40859
|
||||
- speed up var-tracking on various KDE sources (PR debug/41371)
|
||||
- revert --param max-vartrack-size=NNNN hack
|
||||
- fix up epilogue unwinding with -fsched2-use-superblocks (PR middle-end/41883)
|
||||
- fix a -fcompare-debug failure (PR tree-optimization/42645)
|
||||
- don't make undef symbols weak just because they are known to have C++ vague
|
||||
linkage (PR c++/42608)
|
||||
|
||||
* Sat Jan 9 2010 Jakub Jelinek <jakub@redhat.com> 4.4.2-23
|
||||
- update from gcc-4_4-branch
|
||||
- PRs target/42511, target/42542, target/42564
|
||||
- VTA backports
|
||||
- PRs debug/42630, debug/42631
|
||||
- improve construction of ppc64 constants between 0x80000000 and 0xffffffff
|
||||
- fix inliner and var-tracking not to drop location info needlessly in certain
|
||||
cases (#552376, PR debug/42657)
|
||||
|
||||
* Wed Jan 6 2010 Jakub Jelinek <jakub@redhat.com> 4.4.2-22
|
||||
- add --param max-vartrack-size=NNNN parameter, give up on
|
||||
-fvar-tracking-assignments if var-tracking hash tables are over that limit
|
||||
- fix VTA bugs in the vectorizer (PRs debug/42604, debug/42395)
|
||||
- fix VTA bug with noreturn calls (PR middle-end/42363)
|
||||
|
||||
* Tue Jan 5 2010 Jakub Jelinek <jakub@redhat.com> 4.4.2-21
|
||||
- update from gcc-4_4-branch
|
||||
- PRs c++/42331, middle-end/41344, middle-end/42099, other/42611,
|
||||
rtl-optimization/42475, target/40134, target/42448, target/42503,
|
||||
target/42549, tree-optimization/41956, tree-optimization/42231,
|
||||
tree-optimization/42337, tree-optimization/42614
|
||||
- fix -m*=native with several sources on the command line (PR driver/42442)
|
||||
- avoid code size differences from traversing decl hash tables hashed by uid
|
||||
if uid gap sizes differ
|
||||
- fix .debug_ranges with -ffunction-sections (PR debug/42454)
|
||||
|
||||
* Tue Dec 22 2009 Jakub Jelinek <jakub@redhat.com> 4.4.2-20
|
||||
- fix MEM_SIZE of reload created stack slots (#548825,
|
||||
PR rtl-optimization/42429)
|
||||
|
230
gcc44-max-vartrack-size.patch
Normal file
230
gcc44-max-vartrack-size.patch
Normal file
@ -0,0 +1,230 @@
|
||||
2010-01-05 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* params.def (PARAM_MAX_VARTRACK_SIZE): New.
|
||||
* doc/invoke.texi: Document it.
|
||||
* var-tracking.c: Include toplev.h and params.h.
|
||||
(vt_find_locations): Return bool indicating success. Compute
|
||||
hash sizes unconditionally. Check new parameter, report.
|
||||
(variable_tracking_main_1): Check vt_find_locations results and
|
||||
retry. Renamed from...
|
||||
(variable_tracking_main): ... this. New wrapper to preserve
|
||||
flag_var_tracking_assignments.
|
||||
* Makefile.in (var-tracking.o): Adjust dependencies.
|
||||
|
||||
--- gcc/doc/invoke.texi.jj 2009-12-09 00:36:51.000000000 +0100
|
||||
+++ gcc/doc/invoke.texi 2010-01-05 10:23:34.000000000 +0100
|
||||
@@ -7937,6 +7937,15 @@ with more basic blocks than this paramet
|
||||
motion optimization performed on them. The default value of the
|
||||
parameter is 1000 for -O1 and 10000 for -O2 and above.
|
||||
|
||||
+@item max-vartrack-size
|
||||
+Sets a maximum number of hash table slots to use during variable
|
||||
+tracking dataflow analysis of any function. If this limit is exceeded
|
||||
+with variable tracking at assignments enabled, analysis for that
|
||||
+function is retried without it, after removing all debug insns from
|
||||
+the function. If the limit is exceeded even without debug insns, var
|
||||
+tracking analysis is completely disabled for the function. Setting
|
||||
+the parameter to zero makes it unlimited.
|
||||
+
|
||||
@item min-nondebug-insn-uid
|
||||
Use uids starting at this parameter for nondebug insns. The range below
|
||||
the parameter is reserved exclusively for debug insns created by
|
||||
--- gcc/params.def.jj 2009-09-16 21:35:17.000000000 +0200
|
||||
+++ gcc/params.def 2010-01-06 10:18:04.000000000 +0100
|
||||
@@ -771,6 +771,13 @@ DEFPARAM (PARAM_LOOP_INVARIANT_MAX_BBS_I
|
||||
"max basic blocks number in loop for loop invariant motion",
|
||||
10000, 0, 0)
|
||||
|
||||
+/* Set maximum hash table size for var tracking. */
|
||||
+
|
||||
+DEFPARAM (PARAM_MAX_VARTRACK_SIZE,
|
||||
+ "max-vartrack-size",
|
||||
+ "Max. size of var tracking hash tables",
|
||||
+ 50000000, 0, 0)
|
||||
+
|
||||
/* Set minimum insn uid for non-debug insns. */
|
||||
|
||||
DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID,
|
||||
--- gcc/var-tracking.c.jj 2009-12-17 20:42:04.000000000 +0100
|
||||
+++ gcc/var-tracking.c 2010-01-06 10:17:28.000000000 +0100
|
||||
@@ -108,6 +108,8 @@
|
||||
#include "tree-pass.h"
|
||||
#include "cselib.h"
|
||||
#include "target.h"
|
||||
+#include "toplev.h"
|
||||
+#include "params.h"
|
||||
|
||||
/* Type of micro operation. */
|
||||
enum micro_operation_type
|
||||
@@ -443,7 +445,7 @@ static int add_uses (rtx *, void *);
|
||||
static void add_uses_1 (rtx *, void *);
|
||||
static void add_stores (rtx, const_rtx, void *);
|
||||
static bool compute_bb_dataflow (basic_block);
|
||||
-static void vt_find_locations (void);
|
||||
+static bool vt_find_locations (void);
|
||||
|
||||
static void dump_attrs_list (attrs);
|
||||
static int dump_variable_slot (void **, void *);
|
||||
@@ -5454,7 +5456,7 @@ compute_bb_dataflow (basic_block bb)
|
||||
|
||||
/* Find the locations of variables in the whole function. */
|
||||
|
||||
-static void
|
||||
+static bool
|
||||
vt_find_locations (void)
|
||||
{
|
||||
fibheap_t worklist, pending, fibheap_swap;
|
||||
@@ -5465,6 +5467,8 @@ vt_find_locations (void)
|
||||
int *rc_order;
|
||||
int i;
|
||||
int htabsz = 0;
|
||||
+ int htabmax = PARAM_VALUE (PARAM_MAX_VARTRACK_SIZE);
|
||||
+ bool success = true;
|
||||
|
||||
/* Compute reverse completion order of depth first search of the CFG
|
||||
so that the data-flow runs faster. */
|
||||
@@ -5486,7 +5490,7 @@ vt_find_locations (void)
|
||||
fibheap_insert (pending, bb_order[bb->index], bb);
|
||||
sbitmap_ones (in_pending);
|
||||
|
||||
- while (!fibheap_empty (pending))
|
||||
+ while (success && !fibheap_empty (pending))
|
||||
{
|
||||
fibheap_swap = pending;
|
||||
pending = worklist;
|
||||
@@ -5509,11 +5513,11 @@ vt_find_locations (void)
|
||||
|
||||
SET_BIT (visited, bb->index);
|
||||
|
||||
- if (dump_file && VTI (bb)->in.vars)
|
||||
+ if (VTI (bb)->in.vars)
|
||||
{
|
||||
htabsz
|
||||
- -= htab_size (shared_hash_htab (VTI (bb)->in.vars))
|
||||
- + htab_size (shared_hash_htab (VTI (bb)->out.vars));
|
||||
+ -= (htab_size (shared_hash_htab (VTI (bb)->in.vars))
|
||||
+ + htab_size (shared_hash_htab (VTI (bb)->out.vars)));
|
||||
oldinsz
|
||||
= htab_elements (shared_hash_htab (VTI (bb)->in.vars));
|
||||
oldoutsz
|
||||
@@ -5577,9 +5581,20 @@ vt_find_locations (void)
|
||||
}
|
||||
|
||||
changed = compute_bb_dataflow (bb);
|
||||
- if (dump_file)
|
||||
- htabsz += htab_size (shared_hash_htab (VTI (bb)->in.vars))
|
||||
- + htab_size (shared_hash_htab (VTI (bb)->out.vars));
|
||||
+ htabsz += (htab_size (shared_hash_htab (VTI (bb)->in.vars))
|
||||
+ + htab_size (shared_hash_htab (VTI (bb)->out.vars)));
|
||||
+
|
||||
+ if (htabmax && htabsz > htabmax)
|
||||
+ {
|
||||
+ if (MAY_HAVE_DEBUG_INSNS)
|
||||
+ inform (DECL_SOURCE_LOCATION (cfun->decl),
|
||||
+ "variable tracking size limit exceeded with debug insns, retrying without");
|
||||
+ else
|
||||
+ inform (DECL_SOURCE_LOCATION (cfun->decl),
|
||||
+ "variable tracking size limit exceeded");
|
||||
+ success = false;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
if (changed)
|
||||
{
|
||||
@@ -5630,7 +5645,7 @@ vt_find_locations (void)
|
||||
}
|
||||
}
|
||||
|
||||
- if (MAY_HAVE_DEBUG_INSNS)
|
||||
+ if (success && MAY_HAVE_DEBUG_INSNS)
|
||||
FOR_EACH_BB (bb)
|
||||
gcc_assert (VTI (bb)->flooded);
|
||||
|
||||
@@ -5640,6 +5655,8 @@ vt_find_locations (void)
|
||||
sbitmap_free (visited);
|
||||
sbitmap_free (in_worklist);
|
||||
sbitmap_free (in_pending);
|
||||
+
|
||||
+ return success;
|
||||
}
|
||||
|
||||
/* Print the content of the LIST to dump file. */
|
||||
@@ -7542,9 +7558,11 @@ vt_finalize (void)
|
||||
|
||||
/* The entry point to variable tracking pass. */
|
||||
|
||||
-unsigned int
|
||||
-variable_tracking_main (void)
|
||||
+static inline unsigned int
|
||||
+variable_tracking_main_1 (void)
|
||||
{
|
||||
+ bool success;
|
||||
+
|
||||
if (flag_var_tracking_assignments < 0)
|
||||
{
|
||||
delete_debug_insns ();
|
||||
@@ -7569,7 +7587,31 @@ variable_tracking_main (void)
|
||||
}
|
||||
}
|
||||
|
||||
- vt_find_locations ();
|
||||
+ success = vt_find_locations ();
|
||||
+
|
||||
+ if (!success && flag_var_tracking_assignments > 0)
|
||||
+ {
|
||||
+ vt_finalize ();
|
||||
+
|
||||
+ delete_debug_insns ();
|
||||
+
|
||||
+ /* This is later restored by our caller. */
|
||||
+ flag_var_tracking_assignments = 0;
|
||||
+
|
||||
+ vt_initialize ();
|
||||
+
|
||||
+ if (!frame_pointer_needed && !vt_stack_adjustments ())
|
||||
+ gcc_unreachable ();
|
||||
+
|
||||
+ success = vt_find_locations ();
|
||||
+ }
|
||||
+
|
||||
+ if (!success)
|
||||
+ {
|
||||
+ vt_finalize ();
|
||||
+ vt_debug_insns_local (false);
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||
{
|
||||
@@ -7583,6 +7625,19 @@ variable_tracking_main (void)
|
||||
vt_debug_insns_local (false);
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+unsigned int
|
||||
+variable_tracking_main (void)
|
||||
+{
|
||||
+ unsigned int ret;
|
||||
+ int save = flag_var_tracking_assignments;
|
||||
+
|
||||
+ ret = variable_tracking_main_1 ();
|
||||
+
|
||||
+ flag_var_tracking_assignments = save;
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
|
||||
static bool
|
||||
gate_handle_var_tracking (void)
|
||||
--- gcc/Makefile.in.jj 2010-01-04 10:07:40.000000000 +0100
|
||||
+++ gcc/Makefile.in 2010-01-05 10:24:39.000000000 +0100
|
||||
@@ -2750,7 +2750,8 @@ regstat.o : regstat.c $(CONFIG_H) $(SYST
|
||||
var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \
|
||||
$(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \
|
||||
- $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H)
|
||||
+ $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H) \
|
||||
+ $(TOPLEV_H) $(PARAMS_H)
|
||||
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
$(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \
|
||||
$(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \
|
68
gcc44-pr42608.patch
Normal file
68
gcc44-pr42608.patch
Normal file
@ -0,0 +1,68 @@
|
||||
2010-01-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/42608
|
||||
* varasm.c (declare_weak): Add weak attribute to decl if it
|
||||
doesn't have one already.
|
||||
(assemble_external): Only add decls to weak_decls if they also
|
||||
have weak attribute.
|
||||
|
||||
* g++.dg/template/instantiate11.C: New test.
|
||||
|
||||
--- gcc/varasm.c.jj 2009-11-09 16:38:29.000000000 +0100
|
||||
+++ gcc/varasm.c 2010-01-08 13:30:12.000000000 +0100
|
||||
@@ -2309,13 +2309,15 @@ assemble_external (tree decl ATTRIBUTE_U
|
||||
/* We want to output annotation for weak and external symbols at
|
||||
very last to check if they are references or not. */
|
||||
|
||||
- if (SUPPORTS_WEAK && DECL_WEAK (decl)
|
||||
+ if (SUPPORTS_WEAK
|
||||
+ && DECL_WEAK (decl)
|
||||
/* TREE_STATIC is a weird and abused creature which is not
|
||||
generally the right test for whether an entity has been
|
||||
locally emitted, inlined or otherwise not-really-extern, but
|
||||
for declarations that can be weak, it happens to be
|
||||
match. */
|
||||
- && !TREE_STATIC (decl))
|
||||
+ && !TREE_STATIC (decl)
|
||||
+ && lookup_attribute ("weak", DECL_ATTRIBUTES (decl)))
|
||||
weak_decls = tree_cons (NULL, decl, weak_decls);
|
||||
|
||||
#ifdef ASM_OUTPUT_EXTERNAL
|
||||
@@ -5008,6 +5010,9 @@ declare_weak (tree decl)
|
||||
warning (0, "weak declaration of %q+D not supported", decl);
|
||||
|
||||
mark_weak (decl);
|
||||
+ if (!lookup_attribute ("weak", DECL_ATTRIBUTES (decl)))
|
||||
+ DECL_ATTRIBUTES (decl)
|
||||
+ = tree_cons (get_identifier ("weak"), NULL, DECL_ATTRIBUTES (decl));
|
||||
}
|
||||
|
||||
static void
|
||||
--- gcc/testsuite/g++.dg/template/instantiate11.C.jj 2010-01-08 13:48:58.000000000 +0100
|
||||
+++ gcc/testsuite/g++.dg/template/instantiate11.C 2010-01-08 14:18:44.000000000 +0100
|
||||
@@ -0,0 +1,25 @@
|
||||
+// PR c++/42608
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template <class U, class V>
|
||||
+struct A;
|
||||
+
|
||||
+template <class V>
|
||||
+struct A<int, V>
|
||||
+{
|
||||
+ void f ();
|
||||
+};
|
||||
+
|
||||
+template struct A<int, int>;
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ A<int, int> a;
|
||||
+ a.f ();
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+// Make sure we get undefined reference error if
|
||||
+// A<int, int>::f () isn't instantiated elsewhere.
|
||||
+// { dg-final { scan-assembler-not "weak\[\n\t\]*_ZN1AIiiE1fEv" } }
|
73
gcc44-pr42657.patch
Normal file
73
gcc44-pr42657.patch
Normal file
@ -0,0 +1,73 @@
|
||||
2010-01-09 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR debug/42657
|
||||
* var-tracking.c (var_reg_delete): Don't delete the association
|
||||
between REGs and values or one-part variables if the register
|
||||
isn't clobbered.
|
||||
|
||||
2010-01-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/42657
|
||||
* tree-inline.c (copy_debug_stmt): Don't reset debug stmt just
|
||||
because its first operand is a non-localized variable.
|
||||
|
||||
--- gcc/tree-inline.c.jj 2010-01-08 10:21:30.000000000 +0100
|
||||
+++ gcc/tree-inline.c 2010-01-08 10:19:49.000000000 +0100
|
||||
@@ -2043,6 +2043,12 @@ copy_debug_stmt (gimple stmt, copy_body_
|
||||
gcc_assert (TREE_CODE (*n) == VAR_DECL);
|
||||
t = *n;
|
||||
}
|
||||
+ else if (TREE_CODE (t) == VAR_DECL
|
||||
+ && !TREE_STATIC (t)
|
||||
+ && gimple_in_ssa_p (cfun)
|
||||
+ && !pointer_map_contains (id->decl_map, t)
|
||||
+ && !var_ann (t))
|
||||
+ /* T is a non-localized variable. */;
|
||||
else
|
||||
walk_tree (&t, remap_gimple_op_r, &wi, NULL);
|
||||
|
||||
--- gcc/var-tracking.c.orig 2010-01-09 07:00:12.000000000 -0200
|
||||
+++ gcc/var-tracking.c 2010-01-09 07:00:14.000000000 -0200
|
||||
@@ -1401,14 +1401,15 @@ var_reg_delete_and_set (dataflow_set *se
|
||||
var_reg_set (set, loc, initialized, set_src);
|
||||
}
|
||||
|
||||
-/* Delete current content of register LOC in dataflow set SET. If
|
||||
- CLOBBER is true, also delete any other live copies of the same
|
||||
- variable part. */
|
||||
+/* Delete the association of register LOC in dataflow set SET with any
|
||||
+ variables that aren't onepart. If CLOBBER is true, also delete any
|
||||
+ other live copies of the same variable part, and delete the
|
||||
+ association with onepart dvs too. */
|
||||
|
||||
static void
|
||||
var_reg_delete (dataflow_set *set, rtx loc, bool clobber)
|
||||
{
|
||||
- attrs *reg = &set->regs[REGNO (loc)];
|
||||
+ attrs *nextp = &set->regs[REGNO (loc)];
|
||||
attrs node, next;
|
||||
|
||||
if (clobber)
|
||||
@@ -1421,13 +1422,18 @@ var_reg_delete (dataflow_set *set, rtx l
|
||||
clobber_variable_part (set, NULL, dv_from_decl (decl), offset, NULL);
|
||||
}
|
||||
|
||||
- for (node = *reg; node; node = next)
|
||||
+ for (node = *nextp; node; node = next)
|
||||
{
|
||||
next = node->next;
|
||||
- delete_variable_part (set, node->loc, node->dv, node->offset);
|
||||
- pool_free (attrs_pool, node);
|
||||
+ if (clobber || !dv_onepart_p (node->dv))
|
||||
+ {
|
||||
+ delete_variable_part (set, node->loc, node->dv, node->offset);
|
||||
+ pool_free (attrs_pool, node);
|
||||
+ *nextp = next;
|
||||
+ }
|
||||
+ else
|
||||
+ nextp = &node->next;
|
||||
}
|
||||
- *reg = NULL;
|
||||
}
|
||||
|
||||
/* Delete content of register with number REGNO in dataflow set SET. */
|
49
gcc44-pr42674.patch
Normal file
49
gcc44-pr42674.patch
Normal file
@ -0,0 +1,49 @@
|
||||
2010-01-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/42674
|
||||
* c-decl.c (finish_function): Don't emit -Wreturn-type warnings in
|
||||
functions with noreturn attribute.
|
||||
|
||||
* decl.c (finish_function): Don't emit -Wreturn-type warnings in
|
||||
functions with noreturn attribute.
|
||||
|
||||
* c-c++-common/pr42674.c: New test.
|
||||
|
||||
--- gcc/c-decl.c.jj 2010-01-04 10:46:33.000000000 +0100
|
||||
+++ gcc/c-decl.c 2010-01-13 18:41:44.000000000 +0100
|
||||
@@ -8032,6 +8032,8 @@ finish_function (void)
|
||||
&& !current_function_returns_value && !current_function_returns_null
|
||||
/* Don't complain if we are no-return. */
|
||||
&& !current_function_returns_abnormally
|
||||
+ /* Don't complain if we are declared noreturn. */
|
||||
+ && !TREE_THIS_VOLATILE (fndecl)
|
||||
/* Don't warn for main(). */
|
||||
&& !MAIN_NAME_P (DECL_NAME (fndecl))
|
||||
/* Or if they didn't actually specify a return type. */
|
||||
--- gcc/cp/decl.c.jj 2009-12-23 17:31:06.000000000 +0100
|
||||
+++ gcc/cp/decl.c 2010-01-13 18:43:01.000000000 +0100
|
||||
@@ -12541,6 +12541,8 @@ finish_function (int flags)
|
||||
&& !current_function_returns_value && !current_function_returns_null
|
||||
/* Don't complain if we abort or throw. */
|
||||
&& !current_function_returns_abnormally
|
||||
+ /* Don't complain if we are declared noreturn. */
|
||||
+ && !TREE_THIS_VOLATILE (fndecl)
|
||||
&& !DECL_NAME (DECL_RESULT (fndecl))
|
||||
&& !TREE_NO_WARNING (fndecl)
|
||||
/* Structor return values (if any) are set by the compiler. */
|
||||
--- gcc/testsuite/c-c++-common/pr42674.c.jj 2010-01-13 18:57:20.000000000 +0100
|
||||
+++ gcc/testsuite/c-c++-common/pr42674.c 2010-01-13 18:57:58.000000000 +0100
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* PR middle-end/42674 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-Wreturn-type" } */
|
||||
+
|
||||
+extern void bar (void);
|
||||
+static int foo (void) __attribute__ ((__noreturn__, __used__));
|
||||
+
|
||||
+static int
|
||||
+foo (void)
|
||||
+{
|
||||
+ while (1)
|
||||
+ bar ();
|
||||
+}
|
@ -2,3 +2,4 @@ gcc-4_4_0-0_3:HEAD:gcc-4.4.0-0.3.src.rpm:1232130841
|
||||
gcc-4_4_0-5:HEAD:gcc-4.4.0-5.src.rpm:1242291126
|
||||
gcc-4_4_2-14_fc13:HEAD:gcc-4.4.2-14.fc13.src.rpm:1259930464
|
||||
gcc-4_4_2-20_fc13:HEAD:gcc-4.4.2-20.fc13.src.rpm:1261484502
|
||||
gcc-4_4_2-25_fc13:HEAD:gcc-4.4.2-25.fc13.src.rpm:1263487371
|
||||
|
Loading…
Reference in New Issue
Block a user