Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26461 - gnat 3.15p-r1 Interfaces.C.To_Ada bug
Summary: gnat 3.15p-r1 Interfaces.C.To_Ada bug
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: David Holm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-11 23:16 UTC by Maxim Reznik
Modified: 2003-08-14 03:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bug test (test.adb,192 bytes, text/plain)
2003-08-11 23:16 UTC, Maxim Reznik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Reznik 2003-08-11 23:16:02 UTC
Convertion from C.char_array to Ada String doesn't work.
See attacment.
I ran it and got '' result instead of 'Hello'.
Binary Gnat-3.15p distribution produce right 'Hello' result.
Comment 1 Maxim Reznik 2003-08-11 23:16:52 UTC
Created attachment 15958 [details]
bug test
Comment 2 David Holm (RETIRED) gentoo-dev 2003-08-12 05:09:53 UTC
It seems that our native runtime library is broken for some reason.
Until I have tracked down the problem and fixed it you can use the fsu runtime to compile working binaries (add --RTS=fsu).

Comment 3 David Holm (RETIRED) gentoo-dev 2003-08-13 06:49:53 UTC
Me beating head against rock. Spent some time in objdump without finding anything relevant, then I went on to DDD and discovered odd behaviour when using the native runtime. I diffed the fsu runtimes sourcecode with the native and came up with nothing that would cause this effect.
I then went on to the ebuild and tried a couple of minor stuff with no effect. Then as a last resort I started looking for differences between how we build the native versus fsu runtimes and discovered that the native one used ADACFLAGS whereas fsu used "-O2", ARGH. I rebuilt the native runtime with "-O2" (which is actually the recommended flag by the gnat docs) and suddenly the sample application ran perfectly with both native and fsu... Seems optimizations is more harmful than I initially thought.

Please give gnat-3.15p-r2 a shot, bug #26542. It should resolve this bug as well as add some other minor things I've been working on. Let me know as soon as you've tried it. Assuming it works you might want to reemerge all dev-ada packages you have installed in case it borked some of them for you.
Comment 4 David Holm (RETIRED) gentoo-dev 2003-08-14 03:06:27 UTC
Bug seems to be solved by gnat-3.15p-r2.