1 diff -Naurp gcc/combine.c gcc/combine.c
2 --- gcc/combine.c 2011-07-29 14:05:59.000000000 +0530
3 +++ gcc/combine.c 2012-06-28 15:51:12.000000000 +0530
4 @@ -1666,6 +1666,7 @@ can_combine_p (rtx insn, rtx i3, rtx pre
7 bool all_adjacent = true;
8 + int (*is_volatile_p) (const_rtx);
12 @@ -1914,11 +1915,17 @@ can_combine_p (rtx insn, rtx i3, rtx pre
13 && REG_P (dest) && REGNO (dest) < FIRST_PSEUDO_REGISTER)
16 - /* If there are any volatile insns between INSN and I3, reject, because
17 - they might affect machine state. */
19 + /* If INSN contains volatile references (specifically volatile MEMs),
20 + we cannot combine across any other volatile references.
21 + Even if INSN doesn't contain volatile references, any intervening
22 + volatile insn might affect machine state. */
24 + is_volatile_p = volatile_refs_p (PATTERN (insn))
28 for (p = NEXT_INSN (insn); p != i3; p = NEXT_INSN (p))
29 - if (INSN_P (p) && p != succ && p != succ2 && volatile_insn_p (PATTERN (p)))
30 + if (INSN_P (p) && p != succ && p != succ2 && is_volatile_p (PATTERN (p)))
33 /* If INSN contains an autoincrement or autodecrement, make sure that
34 diff -Naurp gcc/config/avr/avr.c gcc/config/avr/avr.c
35 --- gcc/config/avr/avr.c 2012-06-28 15:47:34.000000000 +0530
36 +++ gcc/config/avr/avr.c 2012-06-28 15:51:12.000000000 +0530
37 @@ -6307,6 +6307,7 @@ avr_encode_section_info (tree decl, rtx
39 && decl && DECL_P (decl)
40 && NULL_TREE == DECL_INITIAL (decl)
41 + && !DECL_EXTERNAL (decl)
42 && avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
44 warning (OPT_Wuninitialized,