2010-11-29 Zdenek Dvorak <rakdver@kam.uniff.cz>
PR tree-optimization/46675
* tree-ssa-loop-niter.c (split_to_var_and_offset): Avoid overflow
in offset calculation.
testsuite/ChangeLog:
2010-11-29 Richard Guenther <rguenther@suse.de>
Zdenek Dvorak <rakdver@kam.uniff.cz>
PR tree-optimization/46675
* gcc.dg/pr46675.c: New test.
From-SVN: r167256
+2010-11-29 Zdenek Dvorak <rakdver@kam.uniff.cz>
+
+ PR tree-optimization/46675
+ * tree-ssa-loop-niter.c (split_to_var_and_offset): Avoid overflow
+ in offset calculation.
+
2010-11-29 Jan Hubicka <jh@suse.cz>
2010-11-29 Jan Hubicka <jh@suse.cz>
- * collect2.c (main): Do not imply verbose output with LTO and linker plugin.
+ * collect2.c (main): Do not imply verbose output with
+ LTO and linker plugin.
2010-11-29 Dodji Seketeli <dodji@redhat.com>
2010-11-29 Dodji Seketeli <dodji@redhat.com>
PR debug/46101
* dwarf2out.c (lookup_type_die_strip_naming_typedef): New
function.
PR debug/46101
* dwarf2out.c (lookup_type_die_strip_naming_typedef): New
function.
- (scope_die_for, gen_type_die_for_member): Replace uses of
+ (scope_die_for, gen_type_die_for_member): Replace uses of
lookup_type_die with use of lookup_type_die_strip_naming_typedef.
2010-11-29 Iain Sandoe <iains@gcc.gnu.org>
lookup_type_die with use of lookup_type_die_strip_naming_typedef.
2010-11-29 Iain Sandoe <iains@gcc.gnu.org>
(SECTION_NO_ANCHOR): Define.
(TARGET_ASM_OUTPUT_ANCHOR) Define with a default of NULL.
(DARWIN_SECTION_ANCHORS): Define with a default of 0.
(SECTION_NO_ANCHOR): Define.
(TARGET_ASM_OUTPUT_ANCHOR) Define with a default of NULL.
(DARWIN_SECTION_ANCHORS): Define with a default of 0.
2010-11-29 Joseph Myers <joseph@codesourcery.com>
* system.h: Include "safe-ctype.h" instead of <safe-ctype.h>.
2010-11-29 Joseph Myers <joseph@codesourcery.com>
* system.h: Include "safe-ctype.h" instead of <safe-ctype.h>.
- Include <signal.h>, <sys/mman.h>, <sys/resource.h> and
- <sys/times.h>.
+ Include <signal.h>, <sys/mman.h>, <sys/resource.h> and <sys/times.h>.
(O_BINARY, SIGCHLD, MAP_FAILED, MAP_ANONYMOUS, kill):
Conditionally define.
(GET_ENVIRONMENT): Poison.
(O_BINARY, SIGCHLD, MAP_FAILED, MAP_ANONYMOUS, kill):
Conditionally define.
(GET_ENVIRONMENT): Poison.
* config/microblaze/microblaze.c: Don't include <signal.h>.
* config/mips/mips.c: Don't include <signal.h>.
* config/rs6000/host-darwin.c: Don't include <signal.h>.
* config/microblaze/microblaze.c: Don't include <signal.h>.
* config/mips/mips.c: Don't include <signal.h>.
* config/rs6000/host-darwin.c: Don't include <signal.h>.
- * cppdefault.c (cpp_relocated): Use getenv instead of
- GET_ENVIRONMENT.
+ * cppdefault.c (cpp_relocated): Use getenv instead of GET_ENVIRONMENT.
* defaults.h (GET_ENVIRONMENT): Don't define.
* et-forest.h: Don't include <ansidecl.h> or <stddef.h>.
* gcc.c: Don't include <signal.h>, <sys/mman.h> or <sys/types.h>.
* defaults.h (GET_ENVIRONMENT): Don't define.
* et-forest.h: Don't include <ansidecl.h> or <stddef.h>.
* gcc.c: Don't include <signal.h>, <sys/mman.h> or <sys/types.h>.
* ggc-zone.c: Don't include <sys/mman.h>.
(MAP_ANONYMOUS, MAP_FAILED): Don't define.
* graph.c: Include "config.h" instead of <config.h>.
* ggc-zone.c: Don't include <sys/mman.h>.
(MAP_ANONYMOUS, MAP_FAILED): Don't define.
* graph.c: Include "config.h" instead of <config.h>.
- * incpath.c (add_env_var_paths): Use getenv instead of
- GET_ENVIRONMENT.
- * lto-wrapper.c: Don't include <errno.h>, <signal.h> or
- "libiberty.h".
+ * incpath.c (add_env_var_paths): Use getenv instead of GET_ENVIRONMENT.
+ * lto-wrapper.c: Don't include <errno.h>, <signal.h> or "libiberty.h".
(SIGCHLD, kill): Don't define.
* mips-tfile.c: Don't include <signal.h>.
* opts.c: Don't include <signal.h> or <sys/resource.h>.
(SIGCHLD, kill): Don't define.
* mips-tfile.c: Don't include <signal.h>.
* opts.c: Don't include <signal.h> or <sys/resource.h>.
objc_begin_catch_clause() in that case. Improved error recovery.
Reorganized code to be almost identical to
cp_parser_objc_try_catch_finally_statement.
objc_begin_catch_clause() in that case. Improved error recovery.
Reorganized code to be almost identical to
cp_parser_objc_try_catch_finally_statement.
2010-11-29 Joern Rennecke <amylaar@spamcop.net>
PR tree-optimization/46621
2010-11-29 Joern Rennecke <amylaar@spamcop.net>
PR tree-optimization/46621
+2010-11-29 Richard Guenther <rguenther@suse.de>
+ Zdenek Dvorak <rakdver@kam.uniff.cz>
+
+ PR tree-optimization/46675
+ * gcc.dg/pr46675.c: New test.
+
2010-11-29 Iain Sandoe <iains@gcc.gnu.org>
* gcc/testsuite/objc.dg/strings-1.m: Move to...
* gcc/testsuite/objc.dg/strings/strings-1.m: ... here. Update paths.
* gcc/testsuite/objc.dg/strings-2.m: Move to ...
2010-11-29 Iain Sandoe <iains@gcc.gnu.org>
* gcc/testsuite/objc.dg/strings-1.m: Move to...
* gcc/testsuite/objc.dg/strings/strings-1.m: ... here. Update paths.
* gcc/testsuite/objc.dg/strings-2.m: Move to ...
- * gcc/testsuite/objc.dg/strings/strings-2.m ... here, provide a
+ * gcc/testsuite/objc.dg/strings/strings-2.m ... here, provide a
constructor and class reference for NeXT runtime. Update paths.
* gcc/testsuite/obj-c++.dg/strings-1.m: Move to...
* gcc/testsuite/obj-c++.dg/strings/strings-1.m: ... here. Update paths.
* gcc/testsuite/obj-c++.dg/strings-2.m: Move to ...
constructor and class reference for NeXT runtime. Update paths.
* gcc/testsuite/obj-c++.dg/strings-1.m: Move to...
* gcc/testsuite/obj-c++.dg/strings/strings-1.m: ... here. Update paths.
* gcc/testsuite/obj-c++.dg/strings-2.m: Move to ...
- * gcc/testsuite/obj-c__.dg/strings/strings-2.m ... here, provide a
+ * gcc/testsuite/obj-c__.dg/strings/strings-2.m ... here, provide a
constructor and class reference for NeXT runtime. Update paths.
constructor and class reference for NeXT runtime. Update paths.
2010-11-29 Dodji Seketeli <dodji@redhat.com>
PR c++/42260
* g++.dg/conversion/cast2.C: New test.
2010-11-29 Dodji Seketeli <dodji@redhat.com>
PR c++/42260
* g++.dg/conversion/cast2.C: New test.
- * g++.dg/conversion/cond4/C: Likewise. This ensures we don't regress on
+ * g++.dg/conversion/cond4.C: Likewise.
2010-11-29 Dodji Seketeli <dodji@redhat.com>
PR c++/45383
Reverted patch for PR c++/42260
2010-11-29 Dodji Seketeli <dodji@redhat.com>
PR c++/45383
Reverted patch for PR c++/42260
- * conversion/cast2.C: Reverted new test.
+ * g++.dg/conversion/cast2.C: Reverted new test.
2010-11-29 Dodji Seketeli <dodji@redhat.com>
2010-11-29 Dodji Seketeli <dodji@redhat.com>
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* obj-c++.dg/property/at-property-2.mm: Uncommented testcase.
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/at-property-24.m: New.
* obj-c++.dg/property/at-property-2.mm: Uncommented testcase.
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/at-property-24.m: New.
- * objc.dg/property/at-property-25.m: New.
+ * objc.dg/property/at-property-25.m: New.
* obj-c++.dg/property/at-property-24.mm: New.
* obj-c++.dg/property/at-property-25.mm: New.
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* obj-c++.dg/property/at-property-24.mm: New.
* obj-c++.dg/property/at-property-25.mm: New.
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
- * objc.dg/protocol-qualifier-1.m: New.
+ * objc.dg/protocol-qualifier-1.m: New.
* objc.dg/protocol-qualifier-2.m: New.
* objc.dg/protocol-qualifier-2.m: New.
- * obj-c++.dg/protocol-qualifier-1.mm: New.
+ * obj-c++.dg/protocol-qualifier-1.mm: New.
* obj-c++.dg/protocol-qualifier-2.mm: New.
2010-11-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* obj-c++.dg/protocol-qualifier-2.mm: New.
2010-11-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+int j;
+
+void
+__attribute__((noinline))
+foo (int n)
+{
+ int npairs, i;
+ npairs = n - (-__INT_MAX__ - 1);
+
+ if (npairs > 0)
+ for (i = 0; i < npairs; i++)
+ j++;
+}
+
+int
+main ()
+{
+ foo (5 - __INT_MAX__ - 1);
+
+ if (j != 5)
+ abort ();
+
+ return 0;
+}
*var = op0;
/* Always sign extend the offset. */
off = tree_to_double_int (op1);
*var = op0;
/* Always sign extend the offset. */
off = tree_to_double_int (op1);
- if (negate)
- off = double_int_neg (off);
off = double_int_sext (off, TYPE_PRECISION (type));
mpz_set_double_int (offset, off, false);
off = double_int_sext (off, TYPE_PRECISION (type));
mpz_set_double_int (offset, off, false);
+ if (negate)
+ mpz_neg (offset, offset);