swar-c99-6.5.2.3-struct.c 994 Bytes
/* -----------------------------------------------------------------------------
 *  Copyright (C) 2018-2020 daiteq s.r.o.                http://www.daiteq.com
 *
 *  This program is distributed WITHOUT ANY WARRANTY; without even
 *  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 *  PURPOSE.
 *
 * -----------------------------------------------------------------------------
 *  Filename    : swar-c99-6.5.2.3-struct.c
 *  Authors     : Roman Bartosinski
 *  Description : simple test of clang/LLVM compiler with SWAR extension
 *  Release     :
 *  Version     :
 *  Date        :
 * -----------------------------------------------------------------------------
 */

//A: --has-swar
//C: -daiteq-swar-enable

#define SWAR_USE_UNSIGNED_TYPES
#define SWAR_USE_SIGNED_TYPES
#include "swar-c99.h"

typedef struct test_struct {
  su16x2b ts16x2;
  su10x3b ts10x3;
  su8x4b  ts8x4;
} test_struct_t;

int main(void)
{
  test_struct_t s;

  int sz = sizeof(s);

  return sz;
}