933-avr32_bug_7435.patch 1.3 KB

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