Commit 2abffaa2 by H.J. Lu Committed by H.J. Lu

re PR tree-optimization/38405 ((silent failure) handling bitfield in ternary)

2008-12-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR tree-optimization/38405
	* gcc.dg/torture/pr38405.c: New.

From-SVN: r142538
parent a6b15ad0
2008-12-07 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/38405
* gcc.dg/torture/pr38405.c: New.
2008-12-07 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/aggr10.adb: New test.
......
/* { dg-do run } */
extern void abort ();
extern int printf (char *__format, ...);
struct vpiBinaryConst {
int signed_flag :1;
int sized_flag :1;
};
int binary_get(int code, struct vpiBinaryConst *rfp)
{
switch (code) {
case 1:
return rfp->signed_flag ? 1 : 0;
default:
printf("error: %d not supported\n", code);
return code;
}
}
int main(void)
{
struct vpiBinaryConst x={1,0};
int y=binary_get(1, &x);
if (y!=1)
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment