Giving GCC 4.4.3 the following code with the arguments "-O1 -mcpu=cortex-a8
-mfpu=neon -mfloat-abi=softfp": 

############################################################

#include <stdio.h>
#include <arm_neon.h>

void printv_f32(const float32x4_t &v)
{
        printf("%f\n", vgetq_lane_f32(v, 0));
}

int main()
{
        float32x4_t v = {0.0, 1.0f, 2.0f, 3.0f};

        printv_f32(v);

        return 0;
}

############################################################

Results into an ICE:

/home/liranuna/Projects/mathlib_md/source/main.cpp: In function 'int main()':
/home/liranuna/Projects/mathlib_md/source/main.cpp:21: error: insn does not
satisfy its constraints:
(insn 25 5 7 2 /home/liranuna/Projects/mathlib_md/source/main.cpp:11 (set
(mem/c/i:V4SF (pre_dec:SI (reg/f:SI 0 r0 [134])) [0 v+0 S16 A64])
        (reg:V4SF 95 d16)) 710 {*neon_movv4sf} (expr_list:REG_INC (reg/f:SI 0
r0 [134])
        (nil)))
/home/liranuna/Projects/mathlib_md/source/main.cpp:21: internal compiler error:
in reload_cse_simplify_operands, at postreload.c:396
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: ICE when passing NEON registers using const refrences
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: liranuna at gmail dot com
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: arm-linux-gnueabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43722

Reply via email to