altivec-23.c

来自「用于进行gcc测试」· C语言 代码 · 共 25 行

C
25
字号
/* Verify that it is possible to define variables of composite types   containing vector types.  We used to crash handling the   initializer of automatic ones.  *//* { dg-do compile } *//* { dg-require-effective-target powerpc_altivec_ok } *//* { dg-options "-maltivec -mabi=altivec" } */#include <altivec.h>typedef vector int vt;typedef struct { vt x; int y[sizeof(vt) / sizeof (int)]; } st;#define INIT { 1, 2, 3, 4 }void f (){  vt x = INIT;  vt y[1] = { INIT };  st s = { INIT, INIT };}vt x = INIT;vt y[1] = { INIT };st s = { INIT, INIT };

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?