swar-c99-6.8.4-selection_stmt.c 963 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.8.4-selection_stmt.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"

int foo(void)
{
  volatile su10x3b v3u;
  if (v3u[3]==3)
    return 1;
  else
    return 0;
}

int main(void)
{
  foo();

  return 0;
}