1 --- a/gcc/config/avr32/avr32.c
2 +++ b/gcc/config/avr32/avr32.c
3 @@ -243,14 +243,14 @@ void
4 avr32_override_options (void)
6 const struct part_type_s *part;
7 - const struct arch_type_s *arch;
8 + const struct arch_type_s *arch, *part_arch;
10 /*Add backward compability*/
11 if (strcmp ("uc", avr32_arch_name)== 0)
13 fprintf (stderr, "Warning: Deprecated arch `%s' specified. "
14 "Please use '-march=ucr1' instead. "
15 - "Converting to arch 'ucr1'\n",
16 + "Using arch 'ucr1'\n",
18 avr32_arch_name="ucr1";
20 @@ -298,6 +298,12 @@ avr32_override_options (void)
22 avr32_arch = &avr32_arch_types[avr32_part->arch_type];
24 + /* When architecture implied by -mpart and one passed in -march are
25 + * conflicting, issue an error message */
26 + part_arch = &avr32_arch_types[avr32_part->arch_type];
27 + if (strcmp("none",avr32_part_name) && strcmp("none", avr32_arch_name) && strcmp(avr32_arch_name,part_arch->name))
28 + error ("Conflicting architectures implied by -mpart and -march\n");
30 /* If optimization level is two or greater, then align start of loops to a
31 word boundary since this will allow folding the first insn of the loop.
32 Do this only for targets supporting branch prediction. */