The C language was not designed for Harvard architecture processors with separate memory spaces. This means that there are various non-standard ways to define a variable whose data resides in the Program Memory (Flash).

IAR uses a non-standard keyword to declare a variable in Program Memory:

__flash int mydata[] = .... 

AVR GCC uses Variable Attributes to achieve the same effect:

int mydata[] __attribute__((progmem)) 

avr-libc provides a convenience macro for the Variable Attribute:

#include <avr/pgmspace.h>
int mydata[] PROGMEM = ....

To read back flash data, use the pgm_read_*() macros defined in <avr/pgmspace.h>. All Program Memory handling macros are defined there.

There is also a way to create a method to define variables in Program Memory that is common between the two compilers (IAR and AVR GCC). Create a header file that has these definitions:

#if defined(__ICCAVR__) // IAR C Compiler
#define FLASH_DECLARE(x) __flash x
#if defined(__GNUC__) // GNU Compiler
#define FLASH_DECLARE(x) x __attribute__((__progmem__))

This code snippet checks for the IAR compiler or for the GCC compiler and defines a macro FLASH_DECLARE(x) that will declare a variable in Program Memory using the appropriate method based on the compiler that is being used. Then you would used it like so:

FLASH_DECLARE(int mydata[] = ...);