https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69355

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- pr69355.ii  2016-01-19 13:00:26.772400572 +0100
+++ pr69355-1.ii        2016-01-19 15:54:26.790557524 +0100
@@ -30334,10 +30334,17 @@ namespace std __attribute__ ((__visibili
 # 4 "mytest.cpp"
 typedef tvmet::Vector<double, 3> Vector;

+__attribute__((noinline, noclone)) Vector
+foo (Vector v1)
+{
+  Vector r;
+  r = v1/norm2(v1);
+  return r;
+}
+
 int main(){
  Vector v1;
  v1 = 1,2,3;
- Vector r;
- r = v1/norm2(v1);
+ Vector r = foo(v1);
  std::cout << r;
 }

narrows it down a little bit further, happens also with -fno-strict-aliasing,
somewhere during early inlining the operator/ starts ignoring the passed in
long double rhs argument.  Looking further.

Reply via email to