From b68db6d1892178c1f8dcdfd5fbfd1b2ef0c5b49d Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Thu, 20 Aug 2015 14:22:35 +0000 Subject: [PATCH] avr.c (avr_insert_attributes): In diagnostic essage: Multiply argument avr_n_flash by 64 to match unit of "KiB". * config/avr/avr.c (avr_insert_attributes): In diagnostic essage: Multiply argument avr_n_flash by 64 to match unit of "KiB". (avr_pgm_check_var_decl): Same. From-SVN: r227035 --- gcc/ChangeLog | 6 ++++++ gcc/config/avr/avr.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be061308a56..17855584dfb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-08-20 Georg-Johann Lay + + * config/avr/avr.c (avr_insert_attributes): In diagnostic essage: + Multiply argument avr_n_flash by 64 to match unit of "KiB". + (avr_pgm_check_var_decl): Same. + 2015-08-20 Alan Lawrence * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Move diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 3c477bc8eee..bec9a8bb788 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -9255,10 +9255,10 @@ avr_pgm_check_var_decl (tree node) { if (TYPE_P (node)) error ("%qT uses address space %qs beyond flash of %d KiB", - node, avr_addrspace[as].name, avr_n_flash); + node, avr_addrspace[as].name, 64 * avr_n_flash); else error ("%s %q+D uses address space %qs beyond flash of %d KiB", - reason, node, avr_addrspace[as].name, avr_n_flash); + reason, node, avr_addrspace[as].name, 64 * avr_n_flash); } else { @@ -9305,7 +9305,7 @@ avr_insert_attributes (tree node, tree *attributes) if (avr_addrspace[as].segment >= avr_n_flash) { error ("variable %q+D located in address space %qs beyond flash " - "of %d KiB", node, avr_addrspace[as].name, avr_n_flash); + "of %d KiB", node, avr_addrspace[as].name, 64 * avr_n_flash); } else if (!AVR_HAVE_LPM && avr_addrspace[as].pointer_size > 2) { -- 2.30.2