summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/expr.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2012-05-18 19:02:39 +0000
committerpfg <pfg@FreeBSD.org>2012-05-18 19:02:39 +0000
commit3863c2cc5013e43f270244cc34d10b16ee2012ef (patch)
tree268583b5dd3fd09d6fec1b21bf4184f571c74e88 /contrib/gcc/expr.c
parent31eddd58e3798cc0cb647a258ee1746a9f043078 (diff)
downloadFreeBSD-src-3863c2cc5013e43f270244cc34d10b16ee2012ef.zip
FreeBSD-src-3863c2cc5013e43f270244cc34d10b16ee2012ef.tar.gz
Bring in a subset of gcc fixes that were back ported to
the GCC 4.1 branch and are available under GPLv2. 2007-11-07 Eric Botcazou <ebotcazou@libertysurf.fr> PR rtl-optimization/33822 * rtl.h (REG_OFFSET): Fix comment. * var-tracking.c (INT_MEM_OFFSET): New macro. (var_mem_set): Use it. (var_mem_delete_and_set): Likewise. (var_mem_delete): Likewise. (vt_get_decl_and_offset): Likewise. (offset_valid_for_tracked_p): New predicate. (count_uses): Do not track locations with invalid offsets. (add_uses): Likewise. (add_stores): Likewise. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129972 2007-11-16 Richard Guenther <rguenther@suse.de> PR middle-end/34030 * fold-const.c (fold_binary): Use correct types for folding 1 << X & Y to Y >> X & 1. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130242 2008-01-14 Eric Botcazou <ebotcazou@adacore.com> PR rtl-optimization/31944 * cse.c (remove_pseudo_from_table): New function. (merge_equiv_classes): Use above function to remove pseudo-registers. (invalidate): Likewise http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131524 2008-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Backport: 2007-11-07 Kenneth Zadeck <zadeck@naturalbridge.com> PR middle-end/33826 * ipa-pure-const (static_execute): Added code to keep recursive functions from being marked as pure or const. * ipa-utils (searchc): Fixed comment. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131807 2008-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Backport: 2007-08-02 Nathan Froyd <froydnj@codesourcery.com> PR middle-end/25445 * varasm.c (default_binds_local_p_1): Consult flag_whole_program if we are compiling with -fPIC. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132061 2008-02-04 Richard Guenther <rguenther@suse.de> PR middle-end/33631 * expr.c (count_type_elements): Give for unions instead of guessing. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132101 2008-02-14 Alan Modra <amodra@bigpond.net.au> PR target/34393 * config/rs6000/rs6000.md (restore_stack_block): Force operands[1] to a reg. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132309 2008-03-25 Richard Guenther <rguenther@suse.de> Backport from mainline: 2008-02-12 Richard Guenther <rguenther@suse.de> PR middle-end/35163 * fold-const.c (fold_widened_comparison): Use get_unwidened in value-preserving mode. Disallow final truncation. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133509 2008-11-30 Eric Botcazou <ebotcazou@adacore.com> PR target/38287 * config/sparc/sparc.md (divsi3 expander): Remove constraints. (divsi3_sp32): Add new alternative with 'K' for operand #2. (cmp_sdiv_cc_set): Factor common string. (udivsi3_sp32): Add new alternative with 'K' for operand #2. Add TARGET_V9 case. (cmp_udiv_cc_set): Factor common string. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142298 Reviewed by: mm Approved by: jhb (mentor) MFC after: 1 week
Diffstat (limited to 'contrib/gcc/expr.c')
-rw-r--r--contrib/gcc/expr.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/contrib/gcc/expr.c b/contrib/gcc/expr.c
index 1773fa1..3655eb0 100644
--- a/contrib/gcc/expr.c
+++ b/contrib/gcc/expr.c
@@ -4750,14 +4750,7 @@ count_type_elements (tree type, bool allow_flexarr)
case UNION_TYPE:
case QUAL_UNION_TYPE:
- {
- /* Ho hum. How in the world do we guess here? Clearly it isn't
- right to count the fields. Guess based on the number of words. */
- HOST_WIDE_INT n = int_size_in_bytes (type);
- if (n < 0)
- return -1;
- return n / UNITS_PER_WORD;
- }
+ return -1;
case COMPLEX_TYPE:
return 2;
OpenPOWER on IntegriCloud