[Bug fortran/68649] [6/7/8 Regression] note: code may be misoptimized unless -fno-strict-aliasing is used

2018-02-12 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68649
Bug 68649 depends on bug 68560, which changed state.

Bug 68560 Summary: [6/7/8 Regression] The test gfortran.dg/shape_8.f90 now 
fails when compiled with -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68560

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug fortran/68649] [6/7/8 Regression] note: code may be misoptimized unless -fno-strict-aliasing is used

2018-02-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68649

Thomas Koenig  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org

--- Comment #22 from Thomas Koenig  ---

What we _could_ do with our array descriptors is to cast them to
a pointer containing a flexible array member, i.e.

struct type_descr {
  type *base_addr;
  size_t offset;
  dtype_type dtype;
  index_type span;
  descriptor_dimension dim[];
}

which would make all our function calls equal.

I have lightly tested the concept with a C program, i.e.

foo.c:

struct Xflex { int n; int a[]; };

int foo (struct Xflex *f)
{
  int i;
  int s;
  s = 0;
  for (i=0; in; i++)
s += f->a[i];

  return s;
}

bar.c:

#include 

struct Xflex { int n; int a[]; };
struct X2 { int n; int a[2]; };

struct X2 x;

int foo (struct Xflex *f);

int main(void)
{
  x.n = 2;
  x.a[0] = 1;
  x.a[1] = 3;
  printf("%d\n", foo((struct Xflex *) ));
}

which seems to work.

[Bug fortran/68649] [6/7/8 Regression] note: code may be misoptimized unless -fno-strict-aliasing is used

2017-07-05 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68649

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #21 from Eric Gallager  ---
Bug 80379 is related

[Bug fortran/68649] [6/7/8 Regression] note: code may be misoptimized unless -fno-strict-aliasing is used

2017-07-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68649

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.4 |6.5

--- Comment #20 from Richard Biener  ---
GCC 6.4 is being released, adjusting target milestone.