public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40112]  New: C++, __attribute__((__progmem__)) lost in typedefs.
@ 2009-05-12 10:20 sb-sf at users dot sourceforge dot net
  2009-08-07 19:16 ` [Bug target/40112] [avr] " eric dot weddington at atmel dot com
  0 siblings, 1 reply; 2+ messages in thread
From: sb-sf at users dot sourceforge dot net @ 2009-05-12 10:20 UTC (permalink / raw)
  To: gcc-bugs

data incorrectly placed into .data or .rodata instead of .progmem. This makes
impossible using avr-libc predefined types (avr/pgmspace.h).

test.cpp:
char __attribute__((__progmem__)) Test1[] = "test1";
char const __attribute__((__progmem__)) Test2[] = "test2";

typedef char __attribute__((__progmem__)) prog_char;
prog_char Test3[] = "Test3";
prog_char const Test4[] = "Test4";

void const * array[] = 
{
    Test1, Test2, Test3, Test4
};

listing:
   8                    .global Test1
   9                            .section        .progmem.data,"a",@progbits
  12                    Test1:
  13 0000 7465 7374             .string "test1"
  13      3100 
  14                    .global Test3
  15                            .data
  18                    Test3:
  19 0000 5465 7374             .string "Test3"
  19      3300 
  20                    .global array
  23                    array:
  24 0006 0000                  .word   Test1
  25 0008 0000                  .word   _ZL5Test2
  26 000a 0000                  .word   Test3
  27 000c 0000                  .word   _ZL5Test4
  28                            .section        .progmem.data
  31                    _ZL5Test2:
  32 0006 7465 7374             .string "test2"
  32      3200 
  33                            .data
  36                    _ZL5Test4:
  37 000e 5465 7374             .string "Test4"
  37      3400 

First two forms leads to correct placement, but generates incorrect warning
(bug 34734)


-- 
           Summary: C++, __attribute__((__progmem__)) lost in typedefs.
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sb-sf at users dot sourceforge dot net
  GCC host triplet: x86
GCC target triplet: AVR


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40112


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/40112] [avr] C++, __attribute__((__progmem__)) lost in typedefs.
  2009-05-12 10:20 [Bug c++/40112] New: C++, __attribute__((__progmem__)) lost in typedefs sb-sf at users dot sourceforge dot net
@ 2009-08-07 19:16 ` eric dot weddington at atmel dot com
  0 siblings, 0 replies; 2+ messages in thread
From: eric dot weddington at atmel dot com @ 2009-08-07 19:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from eric dot weddington at atmel dot com  2009-08-07 19:16 -------


*** This bug has been marked as a duplicate of 34734 ***


-- 

eric dot weddington at atmel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40112


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-07 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 10:20 [Bug c++/40112] New: C++, __attribute__((__progmem__)) lost in typedefs sb-sf at users dot sourceforge dot net
2009-08-07 19:16 ` [Bug target/40112] [avr] " eric dot weddington at atmel dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).