PR tree-optimization/19283
* fold-const.c (fold_widened_comparison): Return NULL if shorter_type
is not shorter than the original type.
* gcc.c-torture/execute/
20050106-1.c: New test.
From-SVN: r93043
2005-01-07 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/19283
+ * fold-const.c (fold_widened_comparison): Return NULL if shorter_type
+ is not shorter than the original type.
+
PR rtl-optimization/19012
* config/i386/i386.md (addqi_1_slp): Set memory attribute.
if (arg0_unw == arg0)
return NULL_TREE;
shorter_type = TREE_TYPE (arg0_unw);
-
+
+ if (TYPE_PRECISION (TREE_TYPE (arg0)) <= TYPE_PRECISION (shorter_type))
+ return NULL_TREE;
+
arg1_unw = get_unwidened (arg1, shorter_type);
if (!arg1_unw)
return NULL_TREE;
2005-01-07 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/19283
+ * gcc.c-torture/execute/20050106-1.c: New test.
+
PR rtl-optimization/18861
* gcc.dg/20050105-1.c: New test.
--- /dev/null
+/* PR tree-optimization/19283 */
+
+void abort (void);
+
+static inline unsigned short
+foo (unsigned int *p)
+{
+ return *p;
+};
+
+unsigned int u;
+
+int
+main ()
+{
+ if ((foo (&u) & 0x8000) != 0)
+ abort ();
+ return 0;
+}