[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] PROGMEM and C++?

From: Ned Konz
Subject: [avr-gcc-list] PROGMEM and C++?
Date: Sun, 26 Mar 2006 20:08:13 -0800

I'm trying to put instances of a class into ROM, and am having problems with the compiler blowing up.

Should the following be OK?

avr-g++ -mmcu=atmega128 -fno-exceptions -c -o romproblems.o romproblems.cpp romproblems.cpp:21: internal compiler error: in set_mem_attributes_minus_bitpos, at emit-rtl.c:1539
Please submit a full bug report,
       with preprocessed source if appropriate.
       See <URL:http://gcc.gnu.org/bugs.html> for instructions.

avr-g++ (GCC) 4.0.2
Problem happens with any setting of -O flag
and with or without -fno-exceptions flag

#define PROGMEM __attribute__((__progmem__))

struct ROMVar1
    int const val;
    ROMVar1(int const& init) : val(init) { }

ROMVar1 PROGMEM rv1b(123);

Ned Konz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]