------- Comment #22 from ramana at gcc dot gnu dot org 2010-07-05 13:43 ------- With trunk as of a couple of days back - the testcase when compiled with -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp for EABI generates the following code for C++ but not for C.
Notice the removal of the check of the condition for being out of range Z9open_filePKc8OpenMode: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 stmfd sp!, {r3, lr} ldr r3, .L2 ldr r1, [r3, r1, asl #2] bl open ldmfd sp!, {r3, lr} bx lr .L3: .align 2 .L2: .word .LANCHOR0 .size _Z9open_filePKc8OpenMode, .-_Z9open_filePKc8OpenMode .section .rodata .align 2 .set .LANCHOR0,. + 0 .type CSWTCH.1, %object .size CSWTCH.1, 16 CSWTCH.1: .word 1 .word 74 .word 3 .word 75 .ident "GCC: (GNU) 4.6.0 20100702 (experimental)" Same file compiled in "C". open_file: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 cmp r1, #3 stmfd sp!, {r3, lr} ldrls r3, .L4 movhi r1, #0 ldrls r1, [r3, r1, asl #2] bl open ldmfd sp!, {r3, lr} bx lr .L5: .align 2 .L4: .word .LANCHOR0 .size open_file, .-open_file .section .rodata .align 2 .set .LANCHOR0,. + 0 .type CSWTCH.1, %object .size CSWTCH.1, 16 CSWTCH.1: .word 1 .word 74 .word 3 .word 75 .ident "GCC: (GNU) 4.6.0 20100702 (experimental)" -- ramana at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|c++ |tree-optimization Ever Confirmed|0 |1 Known to fail| |4.6.0 Last reconfirmed|0000-00-00 00:00:00 |2010-07-05 13:43:01 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44328