This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] Yet another new optimization test


The fix for this one is queued for testing....



        * gcc.dg/tree-ssa/20030807-4.c: New test.

Index: gcc.dg/tree-ssa/20030807-4.c
===================================================================
RCS file: gcc.dg/tree-ssa/20030807-4.c
diff -N gcc.dg/tree-ssa/20030807-4.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- gcc.dg/tree-ssa/20030807-4.c	11 Aug 2003 23:18:47 -0000
***************
*** 0 ****
--- 1,32 ----
+ /* { dg-do compile */
+ /* { dg-options "-O1 -fdump-tree-ssa" } */
+ 
+ typedef struct cpp_reader cpp_reader;
+ typedef unsigned int cppchar_t;
+ struct cpp_reader
+ {
+   int char_precision;
+ };
+ cppchar_t
+ cpp_parse_escape (pfile, pstr, limit, wide)
+      cpp_reader *pfile;
+      const unsigned char **pstr;
+      const unsigned char *limit;
+      int wide;
+ {
+   unsigned int width = ((pfile)->char_precision);
+   cppchar_t mask = ((cppchar_t) 1 << width) - 1;
+   {
+     cppchar_t i = 0, overflow = 0;
+     while (*pstr < limit)
+       {
+ 	overflow |= i ^ (i << 4 >> 4);
+ 	i = arf ();
+       }
+     if (overflow | (i != (i & mask)))
+       foo ();
+   }
+ }
+ 
+ /* There should be four IF conditionals.  */
+ /* { dg-final { scan-tree-dump-times "if " 4 "ssa"} } */




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]