[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-26 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-07-26 10:39 --- I can reproduce this with the C test case from comment #24 on x86_64-linux with -march=nocona. With -march=k8 that test case does _not_ abort. -- What|Removed |Added

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-26 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-07-26 10:43 --- Well I'll be damned! $ ./xgcc -B. t.c -O2 -march=nocona $ ./a.out Aborted $ ./xgcc -B. t.c -O2 -march=nocona -da -fdump-tree-all $ ./a.out $ $ ./xgcc -B. t.c -O2 -march=nocona -S -da $ mv t.s

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-26 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-07-26 11:18 --- My version of t.c: === void abort (); typedef struct _Node { struct _Node *next, *prev; } Node; void __attribute__ ((noinline)) append (Node * q, Node *

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-26 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-07-26 11:43 --- Smaller test case: == void abort (); typedef struct _Node { struct _Node *next, *prev; } Node; inline void swap (Node ** a, Node ** b) {

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-24 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-24 16:25 --- Actually I take that back. the tree dumps are different. Hmm, maybe we are miscompiling more than just the testcase. -- What|Removed |Added

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-24 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-24 16:33 --- (In reply to comment #22) Hmm, maybe we are miscompiling more than just the testcase. Nope. Compiling for x86_64 from ppc-darwin, we get the same failure here. --

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-24 Thread reichelt at gcc dot gnu dot org
--- Additional Comments From reichelt at gcc dot gnu dot org 2005-07-24 22:29 --- Just another data point: The problem disappeared on mainline with Dan's patch http://gcc.gnu.org/ml/gcc-cvs/2005-06/msg01108.html -- What|Removed |Added

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-24 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-24 22:32 --- (In reply to comment #25) Just another data point: The problem disappeared on mainline with Dan's patch Not according to my testing, it still fails on the mainline as of today. --

[Bug tree-optimization/22591] [4.0/4.1 Regression] std::swap() followed by list::erase() produces incorrect list::begin()

2005-07-24 Thread reichelt at gcc dot gnu dot org
--- Additional Comments From reichelt at gcc dot gnu dot org 2005-07-25 00:15 --- Not according to my testing, it still fails on the mainline as of today. Indeed, I have to add -march=pentium4 to trigger the bug, though. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22591