Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 38342
Product:  
Component:  
Status: NEW
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Bill Westfield <westfw@yahoo.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
foo.out output from g++ -v text/plain 2008-12-01 09:16 865 bytes Edit
pgmspace.ii pgmspace.ii for the failing g++ compilation text/plain 2008-12-01 09:18 1.07 KB Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 38342 depends on: Show dependency tree
Show dependency graph
Bug 38342 blocks:

Additional Comments:





Mark bug as waiting for feedback
Mark bug as suspended




View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2009-01-24 16:20 Opened: 2008-12-01 09:14
The program source is trivial (yes, I've attached the .ii file as well):
   #include <avr/pgmspace.h>
   prog_uchar foo [10][10] = { 0 };
When compiled with g++ 4.3.0, this does not actually put the data in program
space.
BillW-MacOSX<1063> /Downloads/arduino-0012/hardware/tools/avr/bin/avr-g++
pgmspace.c -mmcu=atmega168 -c -o pgmspace43c++.o --version
avr-g++ (GCC) 4.3.0
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

BillW-MacOSX<1064> /Downloads/arduino-0012/hardware/tools/avr/bin/avr-g++
pgmspace.c -mmcu=atmega168 -c -o pgmspace43c++.o         
BillW-MacOSX<1065> /Downloads/arduino-0012/hardware/tools/avr/bin/avr-size
pgmspace43c++.o
   text    data     bss     dec     hex filename
      0       0     100     100      64 pgmspace43c++.o 

It works correctly with gcc 4.3.0 (from the same distribution), and it works
correctly with g++ 4.1

BillW-MacOSX<1060> /Downloads/arduino-0012/hardware/tools/avr/bin/avr-gcc
pgmspace.c -mmcu=atmega168 -c -o pgmspace43cc.o --version
avr-gcc (GCC) 4.3.0
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

BillW-MacOSX<1061> /Downloads/arduino-0012/hardware/tools/avr/bin/avr-gcc
pgmspace.c -mmcu=atmega168 -c -o pgmspace43cc.o
BillW-MacOSX<1062> /Downloads/arduino-0012/hardware/tools/avr/bin/avr-size
pgmspace43cc.o
   text    data     bss     dec     hex filename
    100       0       0     100      64 pgmspace43cc.o
BillW-MacOSX<1063>

------- Comment #1 From Bill Westfield 2008-12-01 09:16 -------
Created an attachment (id=16797) [edit]
output from g++ -v

------- Comment #2 From Bill Westfield 2008-12-01 09:18 -------
Created an attachment (id=16798) [edit]
pgmspace.ii for the failing g++ compilation

Actual compile command:

/Downloads/arduino-0012/hardware/tools/avr/bin/avr-g++ pgmspace.c
-mmcu=atmega168 -c -o pgmspace43c++.o -save-temps -v >&foo.out

------- Comment #3 From Bill Westfield 2008-12-01 09:20 -------
Bug has been reproduced on at least two hosts.
See also avrfreaks discussion:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=515859#515859

------- Comment #4 From Joerg Wunsch 2008-12-01 10:37 -------
Note that this is a GCC 4.3.x regression; GCC 4.2.x compiled the code the
way expected.

------- Comment #5 From Richard Guenther 2009-01-24 10:20 -------
GCC 4.3.3 is being released, adjusting target milestone.

------- Comment #6 From Richard Guenther 2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug