http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47056
Laurent GUERBY <laurent at guerby dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #1 from Laurent GUERBY <laurent at guerby dot net> 2010-12-27 
22:26:40 UTC ---
I took one of the test and it fails to link at -O2 and -O1 but works and PASS
at -O0, see below. So I'm assuming some optimization is creating the issue, any
idea on what to look for?

gue...@babe:~/tmp$ gnatmake -f -O2 c390002.adb 
gcc -c -O2 c390002.adb
c390002.adb:101:11: warning: unreachable code
gcc -c -O2 report.adb
report.adb:312:30: warning: index for "NAM" may assume lower bound of 1
report.adb:312:30: warning: suggested replacement: "NAM'First + 2"
report.adb:312:33: warning: index for "NAM" may assume lower bound of 1
report.adb:312:33: warning: suggested replacement: "NAM'First + 6"
gnatbind -x c390002.ali
gnatlink c390002.ali -O2
./c390002.o: In function `_ada_c390002':
c390002.adb:(.text+0x1070): undefined reference to
`c390002__vehicle___alignment.1865'
c390002.adb:(.text+0x1071): undefined reference to
`c390002__vehicle__objectDF.1869'
c390002.adb:(.text+0x1072): undefined reference to
`c390002__vehicle__create.1880'
c390002.adb:(.text+0x1082): undefined reference to
`c390002__vehicle__wheels.1883'
c390002.adb:(.text+0x16d0): undefined reference to
`c390002__motivators___alignment.2087'
c390002.adb:(.text+0x1cc0): undefined reference to
`c390002__motivators___alignment__2.2292'
c390002.adb:(.text+0x22a0): undefined reference to
`c390002__motivators___alignment__3.2497'
collect2: ld returned 1 exit status
gnatlink: error when calling /home/guerby/install-trunk/bin/gcc
gnatmake: *** link failed.
gue...@babe:~/tmp$ gnatmake -f -O1 c390002.adb 
gcc -c -O1 c390002.adb
c390002.adb:101:11: warning: unreachable code
gcc -c -O1 report.adb
report.adb:312:30: warning: index for "NAM" may assume lower bound of 1
report.adb:312:30: warning: suggested replacement: "NAM'First + 2"
report.adb:312:33: warning: index for "NAM" may assume lower bound of 1
report.adb:312:33: warning: suggested replacement: "NAM'First + 6"
gnatbind -x c390002.ali
gnatlink c390002.ali -O1
./c390002.o: In function `_ada_c390002':
c390002.adb:(.text+0x1041): undefined reference to
`c390002__vehicle___alignment.1865'
c390002.adb:(.text+0x1081): undefined reference to
`c390002__vehicle__objectDF.1869'
c390002.adb:(.text+0x11a0): undefined reference to
`c390002__vehicle__wheels.1883'
c390002.adb:(.text+0x1781): undefined reference to
`c390002__motivators___alignment.2087'
c390002.adb:(.text+0x18a0): undefined reference to
`c390002__vehicle__wheels.1883'
c390002.adb:(.text+0x1e71): undefined reference to
`c390002__motivators___alignment__2.2292'
c390002.adb:(.text+0x1f70): undefined reference to
`c390002__vehicle__wheels.1883'
c390002.adb:(.text+0x2531): undefined reference to
`c390002__motivators___alignment__3.2497'
c390002.adb:(.text+0x2620): undefined reference to
`c390002__vehicle__wheels.1883'
collect2: ld returned 1 exit status
gnatlink: error when calling /home/guerby/install-trunk/bin/gcc
gnatmake: *** link failed.
gue...@babe:~/tmp$ gnatmake -f -O0 c390002.adb 
gcc -c -O0 c390002.adb
c390002.adb:101:11: warning: unreachable code
gcc -c -O0 report.adb
report.adb:312:30: warning: index for "NAM" may assume lower bound of 1
report.adb:312:30: warning: suggested replacement: "NAM'First + 2"
report.adb:312:33: warning: index for "NAM" may assume lower bound of 1
report.adb:312:33: warning: suggested replacement: "NAM'First + 6"
gnatbind -x c390002.ali
gnatlink c390002.ali -O0
gue...@babe:~/tmp$ ./c390002 

,.,. C390002 ACATS 2.5 10-12-27 23:26:15
---- C390002 Check that a tagged type may be declared and derived from
                in simple, private and extended forms.  Check package
                Ada.Tags.
==== C390002 PASSED ============================.

Reply via email to