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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |msebor at gcc dot gnu.org
   Target Milestone|---                         |8.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The latter diagnostic is a latent bug in -Wstringop-overflow, I see that on
x86_64-unknown-linux-gnu when testing with -m32.  Possibly from

 
[/space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90:33:0]
# RANGE [-2147483648, 2147483647] NONZERO 4294967292
  _9 = ubound.2_35 * 4;
 
[/space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90:33:0]
# RANGE [0, 4294967295] NONZERO 4294967292
  _10 = (character(kind=4)) _9;
 
[/space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90:33:0]
# RANGE [1, 4294967295]
  _11 = MAX_EXPR <_10, 1>;
 
[/space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90:33:0]
# PT = null { D.3745 } (escaped, escaped heap)
  # ALIGN = 4, MISALIGN = 0
  # USE = nonlocal null { D.3745 D.3746 } (escaped, escaped heap)
  # CLB = nonlocal null { D.3745 D.3746 } (escaped, escaped heap)
  _70 = __builtin_malloc (_11);
 
[/space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90:33:0]
# USE = nonlocal null { D.3745 D.3746 } (escaped, escaped heap)
  # CLB = nonlocal null { D.3745 D.3746 } (escaped, escaped heap)
  __builtin_memcpy (_70, _8, _10);

not sure how it arrives at the minimum of 2147483648 or at the maximum object
size of 2147483647.  Note that the memcpy should probably use the same
size argument as the malloc call (FE issue).

Reply via email to