Open GoogleCodeExporter opened 8 years ago
When -O2 is replaced with -O0 it works. Perhaps some buggy optimization in GCC?
Original comment by jardas...@gmail.com
on 31 May 2010 at 12:14
Is this issue still valid?
I did some changes, but I don't know if it's affected.
Original comment by kobalicek.petr
on 22 Jul 2010 at 4:45
Still valid.
I replaced some of the macros with the code, added some printf()s there and
this is what I got:
L1 - cMaskOpaque_small_begin: w = -11
L2 - cMaskOpaque_small_skip: w = -14
A3 - about to goto cMaskOpaque_main_skip, w = -18
L3 - cMaskOpaque_main_skip: w = -18
A4 - about to goto cMaskOpaque_small_begin, w = -14
L1 - cMaskOpaque_small_begin: w = -14
L2 - cMaskOpaque_small_skip: w = -18
A3 - about to goto cMaskOpaque_main_skip, w = -22
L3 - cMaskOpaque_main_skip: w = -22
A4 - about to goto cMaskOpaque_small_begin, w = -18
L1 - cMaskOpaque_small_begin: w = -18
L2 - cMaskOpaque_small_skip: w = -22
A3 - about to goto cMaskOpaque_main_skip, w = -26
L3 - cMaskOpaque_main_skip: w = -26
A4 - about to goto cMaskOpaque_small_begin, w = -22
L1 - cMaskOpaque_small_begin: w = -22
L2 - cMaskOpaque_small_skip: w = -26
A3 - about to goto cMaskOpaque_main_skip, w = -30
L3 - cMaskOpaque_main_skip: w = -30
A4 - about to goto cMaskOpaque_small_begin, w = -26
L1 - cMaskOpaque_small_begin: w = -26
L2 - cMaskOpaque_small_skip: w = -30
A3 - about to goto cMaskOpaque_main_skip, w = -34
L3 - cMaskOpaque_main_skip: w = -34
A4 - about to goto cMaskOpaque_small_begin, w = -30
L1 - cMaskOpaque_small_begin: w = -30
L2 - cMaskOpaque_small_skip: w = -34
A3 - about to goto cMaskOpaque_main_skip, w = -38
L3 - cMaskOpaque_main_skip: w = -38
A4 - about to goto cMaskOpaque_small_begin, w = -34
L1 - cMaskOpaque_small_begin: w = -34
L2 - cMaskOpaque_small_skip: w = -38
A3 - about to goto cMaskOpaque_main_skip, w = -42
L3 - cMaskOpaque_main_skip: w = -42
A4 - about to goto cMaskOpaque_small_begin, w = -38
// -- still decreasing w, lots and lots of printf()s here
L1 - cMaskOpaque_small_begin: w = -303766
L2 - cMaskOpaque_small_skip: w = -303770
A3 - about to goto cMaskOpaque_main_skip, w = -303774
L3 - cMaskOpaque_main_skip: w = -303774
A4 - about to goto cMaskOpaque_small_begin, w = -303770
L1 - cMaskOpaque_small_begin: w = -303770
L2 - cMaskOpaque_small_skip: w = -303774
A3 - about to goto cMaskOpaque_main_skip, w = -303778
L3 - cMaskOpaque_main_skip: w = -303778
A4 - about to goto cMaskOpaque_small_begin, w = -303774
// !!! Crash here !!! gdb output:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b4cd2d in
Fog::RasterEngine::CompositeBaseFuncsSSE2<Fog::RasterEngine::CompositeScreenSSE2
>::xrgb32_cblit_prgb32_span(unsigned char*, Fog::RasterSolid const*, Fog::Span
const*, Fog::RasterClosure const*) ()
from /home/jardik/Projects/fog-build/libFog.so
Looking at the output of DEBUG build (which works) there is not that much
printf()s in a single function execution and "w" never decreases that much. For
me it looks like some kind of compiler failure when there is lots of inlining -
and gcc failes to inline some functions:
[ 73%] Building CXX object
CMakeFiles/Fog.dir/Fog/Graphics/RasterEngine/Init_SSE2.cpp.o
In file included from
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Init_SSE2.cpp:51:0:
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
: In static member function ‘static void
Fog::RasterEngine::CompositeClearSSE2::prgb32_vblit_span(uint8_t*, const
Fog::Span*, const Fog::RasterClosure*)’:
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:71:28: warning: inlining failed in call to ‘static void
Fog::RasterEngine::CompositeClearSSE2::prgb32_cblit_span(uint8_t*, const
Fog::RasterSolid*, const Fog::Span*, const Fog::RasterClosure*)’: --param
max-inline-insns-single limit reached
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:253:48: warning: called from here
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
: In static member function ‘static void
Fog::RasterEngine::CompositeClearSSE2::xrgb32_vblit_span(uint8_t*, const
Fog::Span*, const Fog::RasterClosure*)’:
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:269:28: warning: inlining failed in call to ‘static void
Fog::RasterEngine::CompositeClearSSE2::xrgb32_cblit_span(uint8_t*, const
Fog::RasterSolid*, const Fog::Span*, const Fog::RasterClosure*)’: --param
max-inline-insns-single limit reached
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:457:48: warning: called from here
Original comment by jardas...@gmail.com
on 31 Oct 2010 at 9:00
Attachments:
Original issue reported on code.google.com by
jardas...@gmail.com
on 31 May 2010 at 12:06