From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.dg/torture/pr45865.c | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr45865.c (limited to 'gcc/testsuite/gcc.dg/torture/pr45865.c') diff --git a/gcc/testsuite/gcc.dg/torture/pr45865.c b/gcc/testsuite/gcc.dg/torture/pr45865.c new file mode 100644 index 000000000..f2e31dbab --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr45865.c @@ -0,0 +1,54 @@ +/* { dg-do compile } */ + +typedef struct rtx_def *rtx; +enum machine_mode { + VOIDmode, + CCFPmode, + CCFPUmode, + MAX_MACHINE_MODE +}; +enum mode_class { + MODE_CC, + MODE_FLOAT, + MODE_COMPLEX_FLOAT, + MODE_VECTOR_FLOAT +}; +extern const enum mode_class mode_class[(int) MAX_MACHINE_MODE]; +enum rtx_code { + UNKNOWN, + GEU, + ORDERED, + CONST_INT +}; +struct rtx_def { + unsigned int code: 16; + unsigned int mode : 8; +}; +extern enum rtx_code reverse_condition (enum rtx_code); +enum rtx_code +reversed_comparison_code_parts (enum rtx_code code, rtx insn, rtx arg0, + rtx arg1) +{ + enum machine_mode mode; + mode = (enum machine_mode) (arg0)->mode; + if (mode == VOIDmode) + mode = (enum machine_mode) (arg1)->mode; + if ((mode_class[(int) (mode)]) == MODE_CC) + return (mode != CCFPmode && mode != CCFPUmode + ? reverse_condition (code) + : reverse_condition_maybe_unordered (code)); + switch (code) + { + case GEU: + return reverse_condition (code); + case ORDERED: + return UNKNOWN; + } + if (((enum rtx_code) (arg0)->code) == CONST_INT + || (((enum machine_mode) (arg0)->mode) != VOIDmode + && ! ((mode_class[(int) (mode)]) == MODE_FLOAT + || (mode_class[(int) (mode)]) == MODE_COMPLEX_FLOAT + || (mode_class[(int) (mode)]) == MODE_VECTOR_FLOAT))) + return reverse_condition (code); + return UNKNOWN; +} -- cgit v1.2.3