This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48070] Target application fails when compiled with optimizations
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Mar 2011 09:26:05 +0000
- Subject: [Bug c/48070] Target application fails when compiled with optimizations
- Auto-submitted: auto-generated
- References: <bug-48070-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48070
Zdenek Sojka <zsojka at seznam dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zsojka at seznam dot cz
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2011-03-11 09:25:54 UTC ---
Even at -O0, valgrind complains about using uninitialised value:
(tested with gcc 4.4.5, x86_64-linux)
$ valgrind -q --track-origins=yes ./src-O0.exe
==11384== Conditional jump or move depends on uninitialised value(s)
==11384== at 0x40A9A6: scene_trace (scene.c:27)
==11384== by 0x40ABAE: reflect (shading.c:38)
==11384== by 0x40AE2B: lightingAndReflectiveShading (shading.c:75)
==11384== by 0x40AF47: computeHitColor (shading.c:93)
==11384== by 0x4030D3: lenscamera_dof (camera.c:247)
==11384== by 0x40329F: lenscamera_render (camera.c:272)
==11384== by 0x403533: camera_render (camera.c:355)
==11384== by 0x40A8E4: rayFlush (ray.c:763)
==11384== by 0x4064E7: main (main.c:114)
==11384== Uninitialised value was created by a stack allocation
==11384== at 0x40AAE7: reflect (shading.c:27)
==11384==
With -O1, there is further warning:
==28521== Conditional jump or move depends on uninitialised value(s)
==28521== at 0x402AF8: ray_setShadowRay (eyeray.c:24)
==28521== by 0x403799: light_nonAmbient (light.c:132)
==28521== by 0x403B1F: light_calculateLighting (light.c:236)
==28521== by 0x407938: computeHitColor (shading.c:22)
==28521== by 0x4077F0: reflect (shading.c:39)
==28521== by 0x4079C0: computeHitColor (shading.c:75)
==28521== by 0x40259F: lenscamera_dof (camera.c:247)
==28521== by 0x402699: lenscamera_render (camera.c:272)
==28521== by 0x4026CC: camera_render (camera.c:355)
==28521== by 0x406261: rayFlush (ray.c:763)
==28521== by 0x4045CC: main (main.c:114)
==28521== Uninitialised value was created by a stack allocation
==28521== at 0x404023: objectpointerlist_intersect (list.c:109)
==28521==
src.exe: eyeray.c:24: ray_setShadowRay: Assertion `vector_isPoint( o )' failed.