[Bug libgomp/86088] New: #pragma omp parallel for freezes if other processes are running

2018-06-07 Thread shibatch at users dot sourceforge.net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86088

Bug ID: 86088
   Summary: #pragma omp parallel for freezes if other processes
are running
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
  Assignee: unassigned at gcc dot gnu.org
  Reporter: shibatch at users dot sourceforge.net
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

The following small program takes more than 20 seconds to finish.
It quickly finishes if compiled with clang.
It finishes instantly without fork().

OS: Ubuntu 16.04.4 LTS
CPU: Core i7-6700

$ gcc-8.1.0 -fopenmp stall.c
$ time ./a.out

real0m26.846s
user1m47.288s
sys 0m0.004s
$ clang-6.0 -fopenmp stall.c
$ time ./a.out

real0m0.423s
user0m1.244s
sys 0m0.012s

--

#include 
#include 
#include 

#define SIZEA 100
#define SIZEB 1

unsigned char a[SIZEA * SIZEB], b[SIZEA * SIZEB];

int main(int argc, char **argv) {
  fork();

  int i;
  for(i=0;i<1000;i++) {
int y;
#pragma omp parallel for
for(y=0;y

[Bug fortran/63514] functions containing volatile are considered pure

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63514

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to Richard Biener from comment #2)
> The fortran frontend must do sth wrong here - it seems to mark the function
> pure itself and either fold or the FE even does the optimization (look at
> the .original dump).

A Fortran compiler is free to assume that a function does not have
side-effects.   The Fortran standard does provide a programmer with
the PURE and IMPURE attribute that can be used to provide hints to
the compiler.  If neither PURE nor IMPURE appears in a function
declaration, the standard does not specify how the function is
treated with respect to pureness of impureness.  It is also noted
that only requirement on IMPURE is with an IMPURE ELEMENTAL 
subprogram.  In this situation, the array elements of an actual 
argument must be handled in array element order.


There is, however, a bug with respect to F2018:

C1588 A local variable of a pure subprogram, or of a BLOCK construct
within a pure subprogram, shall not have the SAVE or VOLATILE attribute.

gfortran is required to issue an error message, which she doesn't at
the moment.

Other than fixing C1588, I think this should be closed as WONTFIX.
A programmer, who depends on function side-effects, should have
his or her programming card revoked.

[Bug rtl-optimization/86087] New: ICE in rtl_verify_fallthru, at cfgrtl.c:2911 (error: verify_flow_info: Incorrect fallthru 8->9; error: wrong insn in the fallthru edge)

2018-06-07 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86087

Bug ID: 86087
   Summary: ICE in rtl_verify_fallthru, at cfgrtl.c:2911 (error:
verify_flow_info: Incorrect fallthru 8->9; error:
wrong insn in the fallthru edge)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu*

gcc-9.0.0-alpha20180603 snapshot (r261132) ICEs when compiling the following
snippet w/ -O3 (-Ofast) -floop-parallelize-all -frename-registers
-freorder-blocks-and-partition -ftrapv -ftree-parallelize-loops=2
-fno-expensive-optimizations -fno-tree-coalesce-vars -fno-tree-dce
-fno-tree-loop-im:

long long int
bp (int *tp, int o3, int lv)
{
  int cs = 0;
  long long int nn = lv;

  while (tp[0] + lv + nn != 0)
nn = tp[0] + 1;

  while (cs < o3)
{
  nn |= (tp[cs] + 1) / (!!tp[0] + 1);
  ++cs;
}

  return nn;
}

% powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20180603 -O3 -floop-parallelize-all
-frename-registers -freorder-blocks-and-partition -ftrapv
-ftree-parallelize-loops=2 -fno-expensive-optimizations -fno-tree-coalesce-vars
-fno-tree-dce -fno-tree-loop-im -c l1fi3pyz.c   
l1fi3pyz.c: In function 'bp':
l1fi3pyz.c:17:1: error: verify_flow_info: Incorrect fallthru 8->9
 }
 ^
l1fi3pyz.c:17:1: error: wrong insn in the fallthru edge
(barrier 549 513 362)
during RTL pass: bbro
l1fi3pyz.c:17:1: internal compiler error: in rtl_verify_fallthru, at
cfgrtl.c:2911
0x556c7c _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180603/work/gcc-9-20180603/gcc/rtl-error.c:108
0x751063 rtl_verify_fallthru
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180603/work/gcc-9-20180603/gcc/cfgrtl.c:2911
0x751063 rtl_verify_flow_info
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180603/work/gcc-9-20180603/gcc/cfgrtl.c:3012
0x73061b verify_flow_info()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180603/work/gcc-9-20180603/gcc/cfghooks.c:263
0x74e581 checking_verify_flow_info
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180603/work/gcc-9-20180603/gcc/cfghooks.h:198
0x74e581 cfg_layout_finalize()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180603/work/gcc-9-20180603/gcc/cfgrtl.c:4333
0x1376de1 execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180603/work/gcc-9-20180603/gcc/bb-reorder.c:2646

[Bug libgomp/63327] Poor caret location in error mesage

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63327

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
  Component|fortran |libgomp

--- Comment #3 from kargl at gcc dot gnu.org ---
Changed component to libgomp as the error does not seem to be
coming from the Fortran frontend.  At, grep of all files in
gcc/fortran with various phrases from "not specified in enclosing"
does not find a candidate error message.

[Bug lto/86086] lto1: internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1256

2018-06-07 Thread ptdrnvqd at 10mail dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86086

--- Comment #3 from ptdrnvqd at 10mail dot org ---
Created attachment 44250
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44250=edit
gcc 8.1.0 output

[Bug lto/86086] lto1: internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1256

2018-06-07 Thread ptdrnvqd at 10mail dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86086

--- Comment #2 from ptdrnvqd at 10mail dot org ---
same error when gcc 8.1.0, (even though added -flto missing in link flags
earlier)

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
8.1.0-5ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 8.1.0 (Ubuntu 8.1.0-5ubuntu1~16.04) 


command:
(cd
/home/lmint-sgt2_usrnam-01/.cache/bazel/_bazel_lmint-sgt2_usrnam-01/4b7ce482992596b3314a677549b0daa3/execroot/org_tensorflow
&&   exec env - ANDROID_BUILD_TOOLS_VERSION=28.0.0
ANDROID_NDK_API_LEVEL=17
ANDROID_NDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk/ndk-bundle
ANDROID_SDK_API_LEVEL=27
ANDROID_SDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk
COMPUTECPP_TOOLKIT_PATH=/home/lmint-sgt2_usrnam-01/Downloads/programs/ComputeCpp-CE-0.8.0-Ubuntu-16.04-x86_64
HOST_CXX_COMPILER=/usr/bin/g++ HOST_C_COMPILER=/usr/bin/gcc
PATH=/home/lmint-sgt2_usrnam-01/.nix-profile/bin:/home/lmint-sgt2_usrnam-01/.cargo/bin:/opt/OpenPrinting-Gutenprint/sbin:/opt/OpenPrinting-Gutenprint/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PWD=/proc/self/cwd PYTHON_BIN_PATH=/usr/bin/python3
PYTHON_LIB_PATH=/usr/local/lib/python3.5/dist-packages TF_DOWNLOAD_CLANG=0 
   TF_NEED_COMPUTECPP=1 TF_NEED_CUDA=0 TF_NEED_OPENCL_SYCL=1  
/usr/bin/gcc -shared -o
bazel-out/k8-opt/bin/tensorflow/libtensorflow_framework.so
'-Wl,-rpath,$ORIGIN/../_solib_k8/_U@mkl_Ulinux_S_S_Cmkl_Ulibs_Ulinux___Uexternal_Smkl_Ulinux_Slib'
-Lbazel-out/k8-opt/bin/_solib_k8/_U@mkl_Ulinux_S_S_Cmkl_Ulibs_Ulinux___Uexternal_Smkl_Ulinux_Slib
'-Wl,-rpath,$ORIGIN/' -Wl,-soname,libtensorflow_framework.so -pthread
'-fuse-ld=gold' -save-temps  -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin
-B/usr/bin -pass-exit-codes -Wl,--gc-sections -pipe -flto -fuse-linker-plugin
-g0 -s -Wl,-z,relro,-z,now -v -Wl,-O1 -Wl,--relax -Wl,--gc-sections -Wl,-S
-Wl,@bazel-out/k8-opt/bin/tensorflow/libtensorflow_framework.so-2.params)

[Bug lto/86086] lto1: internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1256

2018-06-07 Thread ptdrnvqd at 10mail dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86086

--- Comment #1 from ptdrnvqd at 10mail dot org ---
Created attachment 44249
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44249=edit
redo -save-temps output for gcc 8.1.0, add flto to link flags

[Bug middle-end/85620] Missing ENDBR after swapcontext

2018-06-07 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85620

H.J. Lu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |---

--- Comment #7 from H.J. Lu  ---
We want to generate ENDBR after swapcontext. swapcontext didn't return the
first time.  It was just kind of "suspended".  Mark it return twice will
unnecessarily disable compiler optimization.

[Bug target/81652] [meta-bug] -fcf-protection=full bugs

2018-06-07 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81652
Bug 81652 depends on bug 85620, which changed state.

Bug 85620 Summary: Missing ENDBR after swapcontext
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85620

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |---

[Bug fortran/86059] ICE in reduce_binary_ac, at fortran/arith.c:1308 (and others)

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86059

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-06-07
 CC||kargl at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from kargl at gcc dot gnu.org ---
I have a patch for this, but I need to spend time 
with the standard because I cannot find a prohibition
against NULL() in an array constructor (although it
makes absolutely no sense to allow it).

Watch for cut-n-paste tab corruption

Index: array.c
===
--- array.c (revision 261285)
+++ array.c (working copy)
@@ -1098,6 +1098,16 @@ match_array_cons_element (gfc_constructor_base *result
   if (m != MATCH_YES)
 return m;

+  if (expr->expr_type == EXPR_FUNCTION
+  && expr->ts.type == BT_UNKNOWN
+  && strcmp(expr->symtree->name, "null") == 0)
+   {
+  gfc_error ("NULL() at %L cannot appear in an array constructor",
+>where);
+  gfc_free_expr (expr);
+  return MATCH_ERROR;
+   }
+
   gfc_constructor_append_expr (result, expr, _current_locus);
   return MATCH_YES;
 }

 gfcx -c ~/tmp/a.f90
/safe/sgk/tmp/a.f90:2:32:

integer :: i(2) = [integer :: null(), 1]
1
Error: NULL() at (1) cannot appear in an array construct
/safe/sgk/tmp/a.f90:3:24:

integer :: j(2) = [1, null()]
1
Error: NULL() at (1) cannot appear in an array construct
/safe/sgk/tmp/a.f90:4:23:

integer :: k(2) = [(null(), n=1, 2)]
   1
Error: NULL() at (1) cannot appear in an array construct

[Bug lto/86086] New: lto1: internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1256

2018-06-07 Thread ptdrnvqd at 10mail dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86086

Bug ID: 86086
   Summary: lto1: internal compiler error: in
odr_types_equivalent_p, at ipa-devirt.c:1256
   Product: gcc
   Version: 7.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ptdrnvqd at 10mail dot org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
7.3.0-21ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-21ubuntu1~16.04) 


command:
(cd
/home/lmint-sgt2_usrnam-01/.cache/bazel/_bazel_lmint-sgt2_usrnam-01/4b7ce482992596b3314a677549b0daa3/execroot/org_tensorflow
&&   exec env - ANDROID_BUILD_TOOLS_VERSION=28.0.0
ANDROID_NDK_API_LEVEL=17
ANDROID_NDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk/ndk-bundle
ANDROID_SDK_API_LEVEL=27
ANDROID_SDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk
COMPUTECPP_TOOLKIT_PATH=/home/lmint-sgt2_usrnam-01/Downloads/programs/ComputeCpp-CE-0.8.0-Ubuntu-16.04-x86_64
HOST_CXX_COMPILER=/usr/bin/g++ HOST_C_COMPILER=/usr/bin/gcc
PATH=/home/lmint-sgt2_usrnam-01/.nix-profile/bin:/home/lmint-sgt2_usrnam-01/.cargo/bin:/opt/OpenPrinting-Gutenprint/sbin:/opt/OpenPrinting-Gutenprint/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PWD=/proc/self/cwd PYTHON_BIN_PATH=/usr/bin/python3
PYTHON_LIB_PATH=/usr/local/lib/python3.5/dist-packages TF_DOWNLOAD_CLANG=0 
   TF_NEED_COMPUTECPP=1 TF_NEED_CUDA=0 TF_NEED_OPENCL_SYCL=1  
/usr/bin/gcc -shared -o
bazel-out/k8-opt/bin/tensorflow/libtensorflow_framework.so
'-Wl,-rpath,$ORIGIN/../_solib_k8/_U@mkl_Ulinux_S_S_Cmkl_Ulibs_Ulinux___Uexternal_Smkl_Ulinux_Slib'
-Lbazel-out/k8-opt/bin/_solib_k8/_U@mkl_Ulinux_S_S_Cmkl_Ulibs_Ulinux___Uexternal_Smkl_Ulinux_Slib
'-Wl,-rpath,$ORIGIN/' -Wl,-soname,libtensorflow_framework.so -pthread
-save-temps '-fuse-ld=gold' -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin
-B/usr/bin -pass-exit-codes -Wl,--gc-sections -g0 -s -Wl,-z,relro,-z,now -v
-Wl,-O1 -Wl,--relax -Wl,--gc-sections -Wl,-S
-Wl,@bazel-out/k8-opt/bin/tensorflow/libtensorflow_framework.so-2.params)


output:
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
7.3.0-21ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-21ubuntu1~16.04) 
COMPILER_PATH=/usr/bin/:/usr/bin/:/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/

[Bug fortran/85631] [8/9 Regression] Runtime error message array bound mismatch with nonzero optimization

2018-06-07 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85631

--- Comment #2 from Thomas Koenig  ---
The matmul inlining is only exposing a bug in reshape with
allocatable variables.

This also fails:

$ cat a.f90
  implicit none
  integer, parameter :: N=2
  real, dimension(:,:), allocatable :: block_1
  real, allocatable, dimension(:,:) :: var_1_mma

  allocate(block_1(N,N))
  block_1 = reshape([-2,3,-5,7], [2,2])

  var_1_mma = transpose(block_1)
  print *,var_1_mma
end program
$ gfortran -fcheck=bounds a.f90
$ ./a.out
At line 9 of file a.f90
Fortran runtime error: Array bound mismatch for dimension 1 of array
'var_1_mma' (140020497252353/2)

Error termination. Backtrace:
#0  0x400f95 in ???
#1  0x401445 in ???
#2  0x7f59b6c8d724 in ???
#3  0x4007f8 in ???
at ../sysdeps/x86_64/start.S:118
#4  0x in ???

[Bug tree-optimization/86085] New: I/O built-ins considered argument clobbers

2018-06-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86085

Bug ID: 86085
   Summary: I/O built-ins considered argument clobbers
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The buggy test case in pr67610 should be diagnosed by -Wrestrict but isn't. 
Debugging shows that the strlen pass discards the length information for the
array in g() in response to the alias oracle determining that the printf() call
might clobber the array argument.  Except for printf with the %n directive,
standard output functions don't modify their arguments.

$ cat z.c && gcc -O2 -S -Wall -Wextra -fdump-tree-optimized=/dev/stdout z.c
void f (void)
{
  char s[] = "123";
  char d[sizeof s];

  __builtin_sprintf (d, "%s", s);   // eliminated (transformed to strcpy by
sprintf pass)

  if (__builtin_strlen (s) != 3)// folded
__builtin_abort ();

  if (__builtin_strlen (d) != 3)// also folded
__builtin_abort ();
}

void g (void)
{
  char s[] = "123";

  __builtin_puts (s);

  if (__builtin_strlen (s) != 3)   // not folded
__builtin_abort ();
}


;; Function f (f, funcdef_no=0, decl_uid=1956, cgraph_uid=0, symbol_order=0)

f ()
{
   [local count: 1073741825]:
  return;

}



;; Function g (g, funcdef_no=1, decl_uid=1961, cgraph_uid=1, symbol_order=1)

g ()
{
  char s[4];
  long unsigned int _1;

   [local count: 1073741825]:
  s = "123";
  __builtin_puts ();
  _1 = __builtin_strlen ();
  if (_1 != 3)
goto ; [0.00%]
  else
goto ; [99.96%]

   [count: 0]:
  __builtin_abort ();

   [local count: 1073312327]:
  s ={v} {CLOBBER};
  return;

}

[Bug c/45879] strcpy returns unexpected result

2018-06-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45879

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #2 from Martin Sebor  ---
GCC 8.1 diagnoses the bug with -Wrestrict:

pr45879.c: In function ‘main’:
pr45879.c:12:7: warning: ‘strcpy’ accessing 5 bytes at offsets 4 and 5 overlaps
4 bytes at offset 5 [-Wrestrict]
   strcpy([4], [5]);
   ^~

[Bug c/85318] -Wc90-c99-compat does not warn about for loop initial declarations

2018-06-07 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85318

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #3 from Marek Polacek  ---
Fixed for GCC 9.

[Bug c/85318] -Wc90-c99-compat does not warn about for loop initial declarations

2018-06-07 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85318

--- Comment #2 from Marek Polacek  ---
Author: mpolacek
Date: Thu Jun  7 19:15:45 2018
New Revision: 261293

URL: https://gcc.gnu.org/viewcvs?rev=261293=gcc=rev
Log:
PR c/85318
* c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
for loop initial declarations.

* gcc.dg/Wc90-c99-compat-10.c: New test.
* gcc.dg/Wc90-c99-compat-11.c: New test.
* gcc.dg/Wc90-c99-compat-12.c: New test.
* gcc.dg/Wc90-c99-compat-9.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/Wc90-c99-compat-10.c
trunk/gcc/testsuite/gcc.dg/Wc90-c99-compat-11.c
trunk/gcc/testsuite/gcc.dg/Wc90-c99-compat-12.c
trunk/gcc/testsuite/gcc.dg/Wc90-c99-compat-9.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/86051] internal compiler error: in conv_function_val, at fortran/trans-expr.c:3717

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86051

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 Depends on||85996
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85996
[Bug 85996] [8/9 Regression] ICE: gfc_trans_select(): Bad type for case expr.

[Bug fortran/86045] ICE in reduce_binary_ac, at fortran/arith.c:1308

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86045

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.4

--- Comment #9 from kargl at gcc dot gnu.org ---
Fixed on 7-branch, 8-branch, and trunk.
Thanks for the bug report.

[Bug fortran/86045] ICE in reduce_binary_ac, at fortran/arith.c:1308

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86045

--- Comment #8 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Jun  7 18:39:30 2018
New Revision: 261291

URL: https://gcc.gnu.org/viewcvs?rev=261291=gcc=rev
Log:
2018-06-07  Steven G. Kargl  

PR fortran/86045
Backport from trunk.
* simplify.c (gfc_simplify_mod): Re-arrange code to test whether
'P' is zero and issue an error if it is.

2018-06-07  Steven G. Kargl  

PR fortran/86045
Backport from trunk.
* gfortran.dg/pr86045.f90: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/pr86045.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/simplify.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug fortran/86045] ICE in reduce_binary_ac, at fortran/arith.c:1308

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86045

--- Comment #7 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Jun  7 18:17:49 2018
New Revision: 261290

URL: https://gcc.gnu.org/viewcvs?rev=261290=gcc=rev
Log:
2018-06-07  Steven G. Kargl  

PR fortran/86045
* simplify.c (gfc_simplify_mod): Re-arrange code to test whether
'P' is zero and issue an error if it is.

2018-06-07  Steven G. Kargl  

PR fortran/86045
* gfortran.dg/pr86045.f90: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/pr86045.f90
Modified:
branches/gcc-8-branch/gcc/fortran/ChangeLog
branches/gcc-8-branch/gcc/fortran/simplify.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug fortran/68241] [meta-bug] [F03] Deferred-length character

2018-06-07 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68241
Bug 68241 depends on bug 85641, which changed state.

Bug 85641 Summary: [7/8/9 Regression] ICE with string concatenate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85641

   What|Removed |Added

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

[Bug fortran/85641] [7/8/9 Regression] ICE with string concatenate

2018-06-07 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85641

Thomas Koenig  changed:

   What|Removed |Added

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

--- Comment #8 from Thomas Koenig  ---
Fixed on call branches, closing.

Thanks for the bug report!

[Bug fortran/85641] [7/8/9 Regression] ICE with string concatenate

2018-06-07 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85641

--- Comment #7 from Thomas Koenig  ---
Author: tkoenig
Date: Thu Jun  7 18:13:33 2018
New Revision: 261289

URL: https://gcc.gnu.org/viewcvs?rev=261289=gcc=rev
Log:
2018-06-07  Thomas Koenig  

PR fortran/85641
Backport from trunk.
* frontend-passes.c (is_fe_temp): Add prototype.
(realloc_string_callback): Early return for frontend-generated
temporary.

2018-06-07  Thomas Koenig  

PR fortran/85641
Backport from trunk.
* gfortran.dg/realloc_on_assign_30.f90: New test.


Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/realloc_on_assign_30.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/frontend-passes.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug target/86084] New: trunk/gcc/config/m32c/m32c.c:4368: suspicious comparison ?

2018-06-07 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86084

Bug ID: 86084
   Summary: trunk/gcc/config/m32c/m32c.c:4368: suspicious
comparison ?
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---
Target: m32c

trunk/gcc/config/m32c/m32c.c:4368:2: warning: logical ‘or’ of equal expressions
[-Wlogical-op]

Source code is

if (GET_CODE (operands[0]) == MEM
|| GET_CODE (operands[0]) == MEM)

Maybe better code

if (GET_CODE (operands[0]) == MEM
|| GET_CODE (operands[1]) == MEM)

[Bug c++/84884] [DR 2244] [C++17] protected constructor and aggregate initialization of base

2018-06-07 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84884

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-06-07
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug fortran/86045] ICE in reduce_binary_ac, at fortran/arith.c:1308

2018-06-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86045

--- Comment #6 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Jun  7 17:53:11 2018
New Revision: 261286

URL: https://gcc.gnu.org/viewcvs?rev=261286=gcc=rev
Log:
2018-06-07  Steven G. Kargl  

PR fortran/86045
* simplify.c (gfc_simplify_mod): Re-arrange code to test whether
'P' is zero and issue an error if it is.

2018-06-07  Steven G. Kargl  

PR fortran/86045
* gfortran.dg/pr86045.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr86045.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/85641] [7/8/9 Regression] ICE with string concatenate

2018-06-07 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85641

--- Comment #6 from Thomas Koenig  ---
Author: tkoenig
Date: Thu Jun  7 17:33:44 2018
New Revision: 261285

URL: https://gcc.gnu.org/viewcvs?rev=261285=gcc=rev
Log:
2018-06-07  Thomas Koenig  

PR fortran/85641
Backport from trunk.
* frontend-passes.c (is_fe_temp): Add prototype.
(realloc_string_callback): Early return for frontend-generated
temporary.

2018-06-07  Thomas Koenig  

PR fortran/85641
Backport from trunk.
* gfortran.dg/realloc_on_assign_30.f90: New test.


Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/realloc_on_assign_30.f90
Modified:
branches/gcc-8-branch/gcc/fortran/ChangeLog
branches/gcc-8-branch/gcc/fortran/frontend-passes.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/86083] New: handle non-constant assignments in strlen

2018-06-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86083

Bug ID: 86083
   Summary: handle non-constant assignments in strlen
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

As discussed in pr57230, the strlen optimizing pass manages to track string
lengths across non-nul constant character stores, it doesn't do the same for
non-constant stores even if their value is known to be non-nul (i.e., it's in
some range that excludes nul).  It's a trivial enhancement to have the pass
consider value ranges and implement the tracking in the non-constant case so
that the bodies of both functions below are eliminated and not just that of
f().

$ cat c.c && gcc -O2 -S -Wall -Wextra -fdump-tree-optimized=/dev/stdout c.c
void f (void)
{
  char a[] = "123";

  a[1] = '4';

  if (__builtin_strlen (a) != 3)   // folded
__builtin_abort ();
}

void g (unsigned i)
{
  char a[] = "123";

  a[1] = '0' + (i % 10);

  if (__builtin_strlen (a) != 3)   // not folded
__builtin_abort ();
}

;; Function f (f, funcdef_no=0, decl_uid=1956, cgraph_uid=0, symbol_order=0)

f ()
{
   [local count: 1073741825]:
  return;

}



;; Function g (g, funcdef_no=1, decl_uid=1960, cgraph_uid=1, symbol_order=1)

g (unsigned int i)
{
  char a[4];
  unsigned int _1;
  unsigned char _2;
  unsigned char _3;
  char _4;
  long unsigned int _5;

   [local count: 1073741825]:
  a = "123";
  _1 = i_8(D) % 10;
  _2 = (unsigned char) _1;
  _3 = _2 + 48;
  _4 = (char) _3;
  a[1] = _4;
  _5 = __builtin_strlen ();
  if (_5 != 3)
goto ; [0.00%]
  else
goto ; [99.96%]

   [count: 0]:
  __builtin_abort ();

   [local count: 1073312327]:
  a ={v} {CLOBBER};
  return;

}

[Bug target/85684] output of instrinsic _xgetbv is wrongly overwritten

2018-06-07 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85684

Uroš Bizjak  changed:

   What|Removed |Added

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

--- Comment #5 from Uroš Bizjak  ---
Fixed for 8.2+.

[Bug target/85684] output of instrinsic _xgetbv is wrongly overwritten

2018-06-07 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85684

--- Comment #4 from uros at gcc dot gnu.org ---
Author: uros
Date: Thu Jun  7 16:37:01 2018
New Revision: 261283

URL: https://gcc.gnu.org/viewcvs?rev=261283=gcc=rev
Log:
PR target/85684
* config/i386/i386.c (ix86_expand_builtin) :
Generate SImode target register for null target.
: Ditto.
: Optimize LSHIFTRT generation.
* config/i386/xsaveintrin.h (_xgetbv): Add missing return.

testsuite/ChangeLog:

PR target/85684
* gcc.target/i386/xgetsetbv.c: Check also variable arguments.


Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/i386/i386.c
branches/gcc-8-branch/gcc/config/i386/xsaveintrin.h
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/xgetsetbv.c

[Bug tree-optimization/86043] strlen after memcpy partially overwriting a string not optimized

2018-06-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86043

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-06-07
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Martin Sebor  ---
Patch: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg00403.html

[Bug tree-optimization/86042] [8/9 Regression] missing strlen optimization after second strcpy

2018-06-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86042

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #5 from Martin Sebor  ---
Patch: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg00403.html

[Bug c++/86082] user-defined literals are not converted to the execution charset

2018-06-07 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86082

Andreas Krebbel  changed:

   What|Removed |Added

 Target||x86_64
   Host||x86_64
  Build||x86_64

--- Comment #1 from Andreas Krebbel  ---
fails at least since r228905

[Bug c++/86082] New: user-defined literals are not converted to the execution charset

2018-06-07 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86082

Bug ID: 86082
   Summary: user-defined literals are not converted to the
execution charset
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: krebbel at gcc dot gnu.org
  Target Milestone: ---

template  void q();
template <> void q<'1','2','3'>() {}

template  void operator""_test() { q (); }

int
main ()
{
  123_test;
}

builds fine with 'g++ t.cpp'
but triggers a link error compiled with 'g++ t.cpp -fexec-charset=IBM1047'

In the specialization of q the string literals '1', '2', '3' get converted to
the target character set as expected. However, the call generated in the body
of the operator does still use the source character set:

10:  2 FUNCGLOBAL DEFAULT2 void q<(char)-15,
(char)-14, (char)-13>()
11: 000216 FUNCGLOBAL DEFAULT2 main
12: 12 FUNCWEAK   DEFAULT6 void operator""
_test<(char)49, (char)50, (char)51>()
13:  0 NOTYPE  GLOBAL DEFAULT  UND void q<(char)49,
(char)50, (char)51>()


When converting a user-defined literal into string literals also a conversion
into the execution charset is required.

[Bug c++/85577] list-initialization chooses initializer-list constructor

2018-06-07 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85577

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Jonathan Wakely  ---
(In reply to Marek Polacek from comment #2)
> Can the testcase be turned into a runtime test?  I couldn't figure it out
> (how to construct A).

The point of the test is that GCC calls the vector(initializer_list)
constructor (which I deleted so that we get an error if it's used, i.e. it
wasn't meant to be a runtime test, just compile-time).

I thought that v{std::move(v)} should have called the vector move constructor,
but actually https://wg21.link/cwg2137 says that GCC is right here (and Clang
and EDG don't implement that DR yet, in Clang's case because it was found to
create other problems).

But GCC seems to be doing the right thing here.

[Bug target/85755] PowerPC Gcc's -mupdate produces inefficient code on power8/power9 machines

2018-06-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85755

Peter Bergner  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |bergner at gcc dot 
gnu.org

--- Comment #5 from Peter Bergner  ---
Hmmm, it must be the extra use of rs6000_offsettable_memref_p() that disables
the update forms.  I'll have a look.

[Bug fortran/85536] ICE on procedure pointer assignment for subroutine with procedure pointer argument

2018-06-07 Thread dev-zero at gentoo dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85536

--- Comment #2 from Tiziano Müller  ---
Ok, I got around to generate a backtrace from gfortran:

[...]
Starting program: /home/tiziano/tmp/gfortran/gcc/f951 ice_minimal_rep.f90
-quiet -dumpbase ice_minimal_rep.f90 -mtune=generic -march=x86-64 -auxbase
ice_minimal_rep -fintrinsic-modules-path finclude -o /tmp/ccQdv1nJ.s

Program received signal SIGSEGV, Segmentation fault.
0x00844729 in compare_type (s1=0x2d78570, s2=0x2d78570) at
../../gcc/gcc/fortran/interface.c:744
744   return gfc_compare_types (>ts, >ts) || s2->ts.type ==
BT_ASSUMED;
(gdb) bt
#0  0x00844729 in compare_type (s1=0x2d78570, s2=0x2d78570) at
../../gcc/gcc/fortran/interface.c:744
#1  0x008457e3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff210 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1294
#2  0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1, 
errmsg=0x7bfff210 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#3  0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff3c0 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
#4  0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1, 
errmsg=0x7bfff3c0 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#5  0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff570 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
#6  0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1, 
errmsg=0x7bfff570 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#7  0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff720 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
#8  0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1, 
errmsg=0x7bfff720 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#9  0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff8d0 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
[...]

which seems to be an endless loop between gfc_check_dummy_characteristics and
gfc_compare_interfaces.

What I find interesting is the fact that ifort (18.0.2) chokes the same way on
the same example:

$ ifort -o ice_minimal_rep ice_minimal_rep.f90 
ice_minimal_rep.f90(19): internal error: Please visit
'http://www.intel.com/software/products/support' for assistance.
end program
^
[ Aborting due to internal error. ]
compilation aborted for ice_minimal_rep.f90 (code 1)

[Bug target/63177] Powerpc no-vfa-vect-depend-2.c and no-vfa-vect-depend-3.c failures

2018-06-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63177

Peter Bergner  changed:

   What|Removed |Added

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

--- Comment #15 from Peter Bergner  ---
Fixed everywhere.

[Bug target/63177] Powerpc no-vfa-vect-depend-2.c and no-vfa-vect-depend-3.c failures

2018-06-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63177

--- Comment #14 from Peter Bergner  ---
Author: bergner
Date: Thu Jun  7 14:03:35 2018
New Revision: 261277

URL: https://gcc.gnu.org/viewcvs?rev=261277=gcc=rev
Log:
Backport from mainline
2018-06-06  Peter Bergner  

PR target/63177
* /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
Don't handle -mcpu=power8 if -mpower9-vector is also used.

Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/rs6000/rs6000.h

[Bug c/85318] -Wc90-c99-compat does not warn about for loop initial declarations

2018-06-07 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85318

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

[Bug target/63177] Powerpc no-vfa-vect-depend-2.c and no-vfa-vect-depend-3.c failures

2018-06-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63177

--- Comment #13 from Peter Bergner  ---
Author: bergner
Date: Thu Jun  7 14:01:57 2018
New Revision: 261276

URL: https://gcc.gnu.org/viewcvs?rev=261276=gcc=rev
Log:
Backport from mainline
2018-06-06  Peter Bergner  

PR target/63177
* /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
Don't handle -mcpu=power8 if -mpower9-vector is also used.

Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/rs6000.h

[Bug target/63177] Powerpc no-vfa-vect-depend-2.c and no-vfa-vect-depend-3.c failures

2018-06-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63177

--- Comment #12 from Peter Bergner  ---
Author: bergner
Date: Thu Jun  7 13:59:37 2018
New Revision: 261275

URL: https://gcc.gnu.org/viewcvs?rev=261275=gcc=rev
Log:
Backport from mainline
2018-06-06  Peter Bergner  

PR target/63177
* /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
Don't handle -mcpu=power8 if -mpower9-vector is also used.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/rs6000/rs6000.h

[Bug debug/84342] Location views breaks cross builds of arm including gnueabihf

2018-06-07 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84342

Ramana Radhakrishnan  changed:

   What|Removed |Added

 CC||ramana at gcc dot gnu.org

--- Comment #11 from Ramana Radhakrishnan  ---
(In reply to Jakub Jelinek from comment #10)
> GCC 8.1 has been released.

(In reply to Jeffrey A. Law from comment #9)
> Alex: I realize that's the point of the hook.  But I'm pretty sure there's
> no way to fix the ARM port given the point at which lengths are set and the
> point at which ccfsm is valid are at two different times.  We'd either need
> a revamp of ccfsm or some layering violations to allow dwarf2out to access
> the underlying routines for length query and bypass the cache.
> 
> It's my view this BZ is resolved.  But if you want to keep it open to track
> the incorrect lengths in the ARM port, that's fine.  But it's certainly no
> longer a regression for gcc-8.

In which case should this still retain the P1 status ? 

The builds are ok since Alex's patch and we need to look at this at some point
of time. 

Richard E and I have been talking about whether ccfsm actually makes sense in
2018 and whether we should just rip it out anyway and make sure that the rtl
optimizers get it right rather than carry this in the far future. It's only
used in A32 state, it's probably not got a huge amount going for it and maybe
we should just rip it out.

[Bug c++/86068] __cpp_transactional_memory is 210500

2018-06-07 Thread rv at rasmusvillemoes dot dk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86068

--- Comment #2 from Rasmus Villemoes  ---
The page https://gcc.gnu.org/projects/cxx-status.html probably needs to be
updated to say __cpp_transactional_memory >= 201500.

[Bug target/85684] output of instrinsic _xgetbv is wrongly overwritten

2018-06-07 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85684

Uroš Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-06-07
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com
   Target Milestone|--- |8.2
 Ever confirmed|0   |1

[Bug target/85684] output of instrinsic _xgetbv is wrongly overwritten

2018-06-07 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85684

--- Comment #3 from Uroš Bizjak  ---
(In reply to Jakub Jelinek from comment #2)
> This has been fixed with r260135 on the trunk.
> https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00515.html
> Uros, are you going to backport at least the _xgetbv fix?

Uh, yes - it looks I forgot to commit the backport.

[Bug target/85684] output of instrinsic _xgetbv is wrongly overwritten

2018-06-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85684

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||uros at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
This has been fixed with r260135 on the trunk.
https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00515.html
Uros, are you going to backport at least the _xgetbv fix?

[Bug middle-end/85567] [7 Regression] internal compiler error: in gimplify_modify_expr, at gimplify.c:5797 when using sincos()

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85567

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||7.3.1
 Resolution|--- |FIXED
  Known to fail||7.3.0

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug sanitizer/84761] AddressSanitizer is not compatible with glibc 2.27 on x86

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84761

Richard Biener  changed:

   What|Removed |Added

  Known to work||7.3.1, 8.1.0
  Known to fail||7.3.0

--- Comment #14 from Richard Biener  ---
Fixed on the GCC 7 branch as well.

[Bug sanitizer/84761] AddressSanitizer is not compatible with glibc 2.27 on x86

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84761

--- Comment #13 from Richard Biener  ---
Author: rguenth
Date: Thu Jun  7 11:56:25 2018
New Revision: 261272

URL: https://gcc.gnu.org/viewcvs?rev=261272=gcc=rev
Log:
2018-06-07  Richard Biener  

Backport from mainline
2018-03-19  Jakub Jelinek  

PR sanitizer/84761
* sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ):
Define if not defined.
(DL_INTERNAL_FUNCTION): Don't define.
(InitTlsSize): For __i386__ if not compiled against glibc 2.27+
determine at runtime whether to use regparm(3), stdcall calling
convention for older glibcs or normal calling convention for
newer glibcs for call to _dl_get_tls_static_info.

Modified:
branches/gcc-7-branch/libsanitizer/ChangeLog
   
branches/gcc-7-branch/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc

[Bug target/85684] output of instrinsic _xgetbv is wrongly overwritten

2018-06-07 Thread pffang at vip dot qq.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85684

Fang Pengfei  changed:

   What|Removed |Added

 CC||pffang at vip dot qq.com

--- Comment #1 from Fang Pengfei  ---
Yes, I found the same problem.
The function _xgetbv cann't produce correct machine code when optimization on.

[Bug pending/86081] expecting integer value - internal compiler error: Aborted

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86081

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||6.1.0
 Resolution|--- |FIXED
  Known to fail||5.5.0

--- Comment #2 from Richard Biener  ---
This has been fixed in GCC 6.  A workaround is to not use -floop-block.  Note
that GCC 5 is no longer maintained.

[Bug pending/86081] expecting integer value - internal compiler error: Aborted

2018-06-07 Thread ptdrnvqd at 10mail dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86081

--- Comment #1 from ptdrnvqd at 10mail dot org ---
either might be a factor:

-floop-interchange -floop-strip-mine -floop-block

[Bug c/86080] Using FLTO ends up in huge package size (jansson zeromq zlib)

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86080

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Richard Biener  ---
The packages contain static archives.  In that case those, when compiled with
-flto, will contain LTO bytecode and not object code.

You want to make sure to use -fno-lto on static archive builds.

[Bug pending/86081] New: expecting integer value - internal compiler error: Aborted

2018-06-07 Thread ptdrnvqd at 10mail dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86081

Bug ID: 86081
   Summary: expecting integer value - internal compiler error:
Aborted
   Product: gcc
   Version: 5.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: pending
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ptdrnvqd at 10mail dot org
  Target Milestone: ---

Created attachment 44248
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44248=edit
preprocessed file (*.i*) , -save-temps

not into programming enough to know what happened

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.5.0-12ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1~16.04) 


command:
(cd
/home/lmint-sgt2_usrnam-01/.cache/bazel/_bazel_lmint-sgt2_usrnam-01/4b7ce482992596b3314a677549b0daa3/execroot/org_tensorflow
&& \
>   exec env - \
> ANDROID_BUILD_TOOLS_VERSION=28.0.0 \
> ANDROID_NDK_API_LEVEL=17 \
> ANDROID_NDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk/ndk-bundle \
> ANDROID_SDK_API_LEVEL=27 \
> ANDROID_SDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk \
> 
> COMPUTECPP_TOOLKIT_PATH=/home/lmint-sgt2_usrnam-01/Downloads/programs/ComputeCpp-CE-0.8.0-Ubuntu-16.04-x86_64
>  \
> HOST_CXX_COMPILER=/usr/bin/g++ \
> HOST_C_COMPILER=/usr/bin/gcc \
> 
> PATH=/home/lmint-sgt2_usrnam-01/.nix-profile/bin:/home/lmint-sgt2_usrnam-01/.cargo/bin:/opt/OpenPrinting-Gutenprint/sbin:/opt/OpenPrinting-Gutenprint/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
>  \
> PWD=/proc/self/cwd \
> PYTHON_BIN_PATH=/usr/bin/python3 \
> PYTHON_LIB_PATH=/usr/local/lib/python3.5/dist-packages \
> TF_DOWNLOAD_CLANG=0 \
> TF_NEED_COMPUTECPP=1 \
> TF_NEED_CUDA=0 \
> TF_NEED_OPENCL_SYCL=1 \
>   /usr/bin/gcc -U_FORTIFY_SOURCE  -v -save-temps -fstack-protector -Wall 
> -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object 
> -fno-omit-frame-pointer -g0 -O2 -D_FORTIFY_SOURCE=1 -DNDEBUG 
> -ffunction-sections -fdata-sections -MD -MF 
> bazel-out/k8-opt/bin/external/gif_archive/_objs/gif/external/gif_archive/lib/gif_font.pic.d
>  -fPIC -iquote external/gif_archive -iquote 
> bazel-out/k8-opt/genfiles/external/gif_archive -iquote external/bazel_tools 
> -iquote bazel-out/k8-opt/genfiles/external/bazel_tools -isystem 
> external/gif_archive/lib -isystem 
> bazel-out/k8-opt/genfiles/external/gif_archive/lib -isystem 
> bazel-out/k8-opt/bin/external/gif_archive/lib -ffunction-sections 
> -fdata-sections -Wl,--gc-sections -O3 -mtune=native -march=native -m64 
> -maccumulate-outgoing-args -m8bit-idiv -minline-stringops-dynamically 
> -fipa-pta -fgraphite-identity -ftree-loop-distribution 
> -fvariable-expansion-in-unroller -freorder-blocks-and-partition -fgcse-sm 
> -fgcse-las -fgcse-after-reload --param 
> omega-eliminate-redundant-constraints=1 -floop-interchange -floop-strip-mine 
> -floop-block -floop-nest-optimize -pipe -g0 -s -Wl,-z,relro,-z,now 
> -ftree-vectorize -v -Wl,-O1 -Wl,--relax -ffunction-sections -fdata-sections 
> -Wl,--gc-sections -O3 -mtune=native -march=native -m64 
> -maccumulate-outgoing-args -m8bit-idiv -minline-stringops-dynamically 
> -fipa-pta -fgraphite-identity -ftree-loop-distribution 
> -fvariable-expansion-in-unroller -freorder-blocks-and-partition -fgcse-sm 
> -fgcse-las -fgcse-after-reload -floop-nest-optimize -pipe -g0 -s 
> -Wl,-z,relro,-z,now -ftree-vectorize -v -fno-canonical-system-headers 
> -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" 
> -D__TIME__="redacted" -c external/gif_archive/lib/gif_font.c -o 

[Bug c/86080] Using FLTO ends up in huge package size (jansson zeromq zlib)

2018-06-07 Thread vinibali1 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86080

--- Comment #5 from Balazs Vinarz  ---
Link for the zeromq.7z:
https://drive.google.com/open?id=15GwJ8EnlxYzFUHtzf30mf4gxqC74l1p6

[Bug tree-optimization/86072] Poor codegen with atomics

2018-06-07 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86072

Alexander Monakov  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org

--- Comment #3 from Alexander Monakov  ---
As for the segfault mentioned in comment 0, this is not a compiler bug: it's
the assembler segfaulting, and it segfaults even with an empty source, so it's
probably an issue/misconfiguration on the godbolt.org side.

[Bug c/86080] Using FLTO ends up in huge package size (jansson zeromq zlib)

2018-06-07 Thread vinibali1 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86080

--- Comment #4 from Balazs Vinarz  ---
Created attachment 44247
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44247=edit
zlib.png

[Bug c/86080] Using FLTO ends up in huge package size (jansson zeromq zlib)

2018-06-07 Thread vinibali1 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86080

--- Comment #3 from Balazs Vinarz  ---
Created attachment 44246
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44246=edit
zeromq.png

[Bug c/86080] Using FLTO ends up in huge package size (jansson zeromq zlib)

2018-06-07 Thread vinibali1 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86080

--- Comment #2 from Balazs Vinarz  ---
Created attachment 44245
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44245=edit
jansson.png

[Bug c/86080] Using FLTO ends up in huge package size (jansson zeromq zlib)

2018-06-07 Thread vinibali1 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86080

--- Comment #1 from Balazs Vinarz  ---
Created attachment 44244
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44244=edit
zlib.7z

[Bug c/86080] New: Using FLTO ends up in huge package size (jansson zeromq zlib)

2018-06-07 Thread vinibali1 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86080

Bug ID: 86080
   Summary: Using FLTO ends up in huge package size (jansson
zeromq zlib)
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vinibali1 at gmail dot com
  Target Milestone: ---

Created attachment 44243
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44243=edit
jansson.7z

Hello there!

I used to play with the compiler options of GCC. These days I was recompiling
the packages of my machine using the PKGBUILD files provided by the Arch
community and I just found a few packages became bigger when using the flto=4
parameter.
0s  0s flto 02  02 flto
jansson 142,00 KiB  419,00 KiB  163,00 KiB  433,00 KiB
zeromq  2,15 MiB8,04 MiB2,46 MiB7,30 MiB
zlib293,00 KiB  717,00 KiB  327,00 KiB  752,00 KiB

For compiled packages and screenshots please look at the attachment.
AMD AthlonII X4 605e
Linux 4.16.13-2-zen
gcc 8.1.1+20180531-1
CFLAGS="-march=x86-64 -mtune=generic -[0s,O2] [-flto=4,] -pipe
-fstack-protector-strong -fno-plt"

PKGBUILDs
https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/jansson
https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/zeromq
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/zlib

Thank you

[Bug tree-optimization/85597] [6/7 Regression] internal compiler error: in compute_live_loop_exits, at tree-ssa-loop-manip.c:229

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85597

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Thu Jun  7 10:10:00 2018
New Revision: 261269

URL: https://gcc.gnu.org/viewcvs?rev=261269=gcc=rev
Log:
2018-06-07  Richard Biener  

Backport from mainline
2018-05-04  Richard Biener  

PR middle-end/85588
* fold-const.c (negate_expr_p): Restrict negation of operand
zero of a division to when we know that can happen without
overflow.
(fold_negate_expr_1): Likewise.

* gcc.dg/torture/pr85588.c: New testcase.
* gcc.dg/torture/pr57656.c: Use dg-additional-options.

2018-05-02  Richard Biener  

PR middle-end/85567
* gimplify.c (gimplify_save_expr): When in SSA form allow
SAVE_EXPRs to compute to SSA vars.

* gcc.dg/torture/pr85567.c: New testcase.

2018-05-02  Richard Biener  

PR tree-optimization/85597
* tree-vect-stmts.c (vectorizable_operation): For ternary SLP
do not use split vect_get_vec_defs call but call vect_get_slp_defs
directly.

* gcc.dg/vect/pr85597.c: New testcase.

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr85567.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr85588.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/vect/pr85597.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/fold-const.c
branches/gcc-7-branch/gcc/gimplify.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr57656.c
branches/gcc-7-branch/gcc/tree-vect-stmts.c

[Bug middle-end/85567] [7 Regression] internal compiler error: in gimplify_modify_expr, at gimplify.c:5797 when using sincos()

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85567

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Thu Jun  7 10:10:00 2018
New Revision: 261269

URL: https://gcc.gnu.org/viewcvs?rev=261269=gcc=rev
Log:
2018-06-07  Richard Biener  

Backport from mainline
2018-05-04  Richard Biener  

PR middle-end/85588
* fold-const.c (negate_expr_p): Restrict negation of operand
zero of a division to when we know that can happen without
overflow.
(fold_negate_expr_1): Likewise.

* gcc.dg/torture/pr85588.c: New testcase.
* gcc.dg/torture/pr57656.c: Use dg-additional-options.

2018-05-02  Richard Biener  

PR middle-end/85567
* gimplify.c (gimplify_save_expr): When in SSA form allow
SAVE_EXPRs to compute to SSA vars.

* gcc.dg/torture/pr85567.c: New testcase.

2018-05-02  Richard Biener  

PR tree-optimization/85597
* tree-vect-stmts.c (vectorizable_operation): For ternary SLP
do not use split vect_get_vec_defs call but call vect_get_slp_defs
directly.

* gcc.dg/vect/pr85597.c: New testcase.

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr85567.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr85588.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/vect/pr85597.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/fold-const.c
branches/gcc-7-branch/gcc/gimplify.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr57656.c
branches/gcc-7-branch/gcc/tree-vect-stmts.c

[Bug tree-optimization/85588] [6/7 Regression] -fwrapv miscompilation

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85588

--- Comment #11 from Richard Biener  ---
Author: rguenth
Date: Thu Jun  7 10:10:00 2018
New Revision: 261269

URL: https://gcc.gnu.org/viewcvs?rev=261269=gcc=rev
Log:
2018-06-07  Richard Biener  

Backport from mainline
2018-05-04  Richard Biener  

PR middle-end/85588
* fold-const.c (negate_expr_p): Restrict negation of operand
zero of a division to when we know that can happen without
overflow.
(fold_negate_expr_1): Likewise.

* gcc.dg/torture/pr85588.c: New testcase.
* gcc.dg/torture/pr57656.c: Use dg-additional-options.

2018-05-02  Richard Biener  

PR middle-end/85567
* gimplify.c (gimplify_save_expr): When in SSA form allow
SAVE_EXPRs to compute to SSA vars.

* gcc.dg/torture/pr85567.c: New testcase.

2018-05-02  Richard Biener  

PR tree-optimization/85597
* tree-vect-stmts.c (vectorizable_operation): For ternary SLP
do not use split vect_get_vec_defs call but call vect_get_slp_defs
directly.

* gcc.dg/vect/pr85597.c: New testcase.

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr85567.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr85588.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/vect/pr85597.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/fold-const.c
branches/gcc-7-branch/gcc/gimplify.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr57656.c
branches/gcc-7-branch/gcc/tree-vect-stmts.c

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #10 from Andreas Schwab  ---
Also, please read footnote 6 in 5.1.1.2.  There is no requirement that the
translation phases correspondent to any part of what the implementation
actually does.

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #9 from Andreas Schwab  ---
There is no conformance bug because the standard does not specify a textual
representation of the preprocessor phases.  Also, your input is INVALID C
anyway.

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread jbeulich at novell dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #8 from jbeulich at novell dot com ---
(In reply to Andreas Schwab from comment #6)
> In C mode, with line numbers, the newlines are required to preserve the line
> number of the tokens.

I don't think preserving line numbers is more important than conforming to the
standard.

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread jbeulich at novell dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #7 from jbeulich at novell dot com ---
(In reply to Andreas Schwab from comment #5)
> It's not plain C since the stray backslashes are invalid.

As said - try with the stray ones removed, i.e.

unsigned \
int \
u \
;

This _is_ valid C from all I know, and pre-processes to

unsigned
 int
 u 
 ;

instead of

unsigned int u ;

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #6 from Andreas Schwab  ---
In C mode, with line numbers, the newlines are required to preserve the line
number of the tokens.

[Bug fortran/49213] [OOP] gfortran rejects structure constructor expression

2018-06-07 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49213

--- Comment #29 from janus at gcc dot gnu.org ---
Another very related test case:


program p

   type tContainer
  class(*), allocatable :: x
   end type

   integer, parameter :: i = 0

   type(tContainer) :: cont

   ! compiler error: Can't convert INTEGER(4) to CLASS(*)
   cont = tContainer(i)

   ! linker error: undefined reference to `__copy_INTEGER_4_.3804'
   cont%x = i

end

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #5 from Andreas Schwab  ---
It's not plain C since the stray backslashes are invalid.

[Bug fortran/49213] [OOP] gfortran rejects structure constructor expression

2018-06-07 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49213

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org
   Target Milestone|--- |9.0

--- Comment #28 from janus at gcc dot gnu.org ---
I guess I should take another look here. Seems I found some useful patchlets
back in the day. Hope they still work ...

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread jbeulich at novell dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #4 from jbeulich at novell dot com ---
(In reply to Andreas Schwab from comment #3)
> Did you use -xassembler-with-cpp?  Without that it's INVALID.

No, I did not, and the example given also is plain C code (minus the too many
backslashes, which I've added just for demonstrating the issue - if you reduce
them to one per line, I think you'll see the difference).

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #3 from Andreas Schwab  ---
Did you use -xassembler-with-cpp?  Without that it's INVALID.

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #2 from Andreas Schwab  ---
I don't see any difference in the preprocessor out with or without -P apart
from the line comments.

[Bug preprocessor/86079] preprocessor fails to splice lines

2018-06-07 Thread jbeulich at novell dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

--- Comment #1 from jbeulich at novell dot com ---
Interesting - with -P the problem goes away.

[Bug preprocessor/86079] New: preprocessor fails to splice lines

2018-06-07 Thread jbeulich at novell dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

Bug ID: 86079
   Summary: preprocessor fails to splice lines
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jbeulich at novell dot com
  Target Milestone: ---

While gcc 4.3 looks to still handle this correctly, at least all versions from
4.7 onwards (I don't have the intermediate versions readily available to check)
fail to splice lines where the first one ends in an escaped newline, at least
in the common case. Note the inconsistency with

unsigned \
int \\
u \\\
;

where the second and third lines are being spliced by "gcc -E", but none of the
others.

This is a clear violation of the standard's translation phase 2, making it
impossible to e.g. preprocess something like

https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/asm-x86/alternative-asm.h;h=0b6151634a01e9662ae4100dcaf3c0736885eb87;hb=refs/heads/staging

into code usable by the .s files produced by the compiler.

[Bug c++/86060] [6/7/8/9 Regression] g++ ICE at on with "c++03" in tsubst_copy, at cp/pt.c:15459

2018-06-07 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86060

Christophe Lyon  changed:

   What|Removed |Added

 CC||clyon at gcc dot gnu.org

--- Comment #5 from Christophe Lyon  ---
Hi,
With the patch, I can see that
FAIL: g++.dg/cpp0x/range-for9.C  -std=c++98

The log contains:
/gcc/testsuite/g++.dg/cpp0x/range-for9.C: In function 'void test()':
/gcc/testsuite/g++.dg/cpp0x/range-for9.C:8:18: error: range-based 'for' loops
only available with -std=c++11 or -std=gnu++11
/gcc/testsuite/g++.dg/cpp0x/range-for9.C:8:18: error: forming reference to
reference type 'int (&)[3]'
compiler exited with status 1
PASS: g++.dg/cpp0x/range-for9.C  -std=c++98  (test for errors, line 8)
FAIL: g++.dg/cpp0x/range-for9.C  -std=c++98 (test for excess errors)

[Bug libfortran/86070] [7 regression] gfortran.dg/fmt_zero_digits.f90 segmentation fault starting with r261077

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86070

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
  Known to work||7.3.0
   Target Milestone|--- |7.4

[Bug tree-optimization/86072] Poor codegen with atomics

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86072

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-06-07
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Andrew is right.  Still confirmed.

Somebody has to decide if it's worth optimizing them and has to sit down and
exactly specify what kind of optimizations are valid.

I guess it's worth optimizing them if these cases appear in real-world code
(and then we'd like to see examples).

As for validity not optimizing them leads to (wanted/required) side-effects
like being a barrier for a lot of compiler optimizations.  Which may mor
may not be designed that way.  I'm sitting on patches teaching points-to
about atomics, specifically making them not escape points or uses/clobbers
for all memory.  Esp. the latter I'm not sure is a good idea to improve,
because there's nothing in the compiler making atomics "special", they
are just modeled as function calls.

[Bug target/86073] -O3 arm generates calls to memset even for known at the compile time very small sizes (<=3)

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86073

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-06-07
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Probably arm misses the setup to handle this via can_store_by_pieces or
set_storage_via_setmem.  What arm subarchitecture are you creating code for?

On x86 with -m32 the 'size' loop isn't recognized as memset at the GIMPLE
level (it isn't a memset after all) and we expand the 'pro' loop as memset
call but not the 'rem' loop.

Note that pro seems to be MAX(size,  & 3) so it isn't really <= 3.

Thus, x86 is working fine but arm isn't.

[Bug tree-optimization/86075] dead store elimination defeats strlen optimization after memset zero followed by strcpy

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86075

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-06-07
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
But then the strlen pass should see the zeroing and then notice the memcpy will
produce a 0-terminated string.  The user might have written this w/o the
a[3] = 0 in place after all.

So IMHO not a DSE fault but possibly a dup of another strlen missed
optimization.

[Bug tree-optimization/86076] [7/8/9 Regression] ICE: verify_gimple failed (error: location references block not in block tree)

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86076

Richard Biener  changed:

   What|Removed |Added

   Keywords||openmp
   Priority|P3  |P2
   Target Milestone|--- |7.4

--- Comment #3 from Richard Biener  ---
Looks like some issue with autopar outlining.

Note such cases are a recipie for GC issues since the referenced BLOCK isn't
kept live by references from locations.  The BLOCK in the other function can
get removed/GCed.  Those issues are hard to track down which is why we have
this verifier...

[Bug driver/86077] gcc does not recognize --param key=value when surrounded by single quotes

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86077

--- Comment #2 from Richard Biener  ---
You can use alternative syntax --param=max-inline-insns-sinle=500 (note the
space being replaced with a =).

[Bug middle-end/86078] Documentation: missing param default values

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86078

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-06-07
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
There is -Wdisabled-optimization, unfortunately it is used in only 3 places
where we give up due to some limits.

Note not in all cases such warnings are warranted - it's often a concious
decision to limit algorithms to linear growth and warning when you hit
limits to enforce that would lead to the false impression that if you
lift the limit you will get more optimization.  I'm thinking of the alias
stmt walkers for example.

[Bug tree-optimization/84353] [8/9 Regression] [graphite] ICE in set_codegen_error, at graphite-isl-ast-to-gimple.c:206

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84353

--- Comment #5 from Richard Biener  ---
I'm testing a cleanup/fix in this area but ultimatively we have no way of
code-generating this 1:1 so unless we invent more magic pattern-matching a
code-generating failure and thus late abort is the correct thing to do.

We might want to revisit the fact that we punt on this by ICEing with
-fchecking...

Getting more testcase for this is nice though.  Getting some brains
inventing patterns we could detect to code-generate expressions like

  if (((-P_9 + 18446744073709551615) % 18446744073709551616) + P_1 <=
18446744073709551614 || ((-P_9 + 18446744073709551615) % 18446744073709551616)
+ P_1 >= 18446744073709551616)

with a data type that cannot represent the above would be nice as well.
Note that even a simple P_9 + P_9 might not be representable but wrap/overflow
in the type we code-generate in (which is fixed! to be the "largest" integer
type the target supports).  So in reality some range information is needed
which we _may_ be able to recover.  Still there will be obviously corner-cases
where we have to give up unless ISL can make guarantees on the value-space
of IVs and parameter expressions it generates.

[Bug tree-optimization/69615] 0 to limit signed range checks don't always use unsigned compare

2018-06-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69615

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Thu Jun  7 07:41:18 2018
New Revision: 261264

URL: https://gcc.gnu.org/viewcvs?rev=261264=gcc=rev
Log:
PR tree-optimization/69615
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
of a cast from a same precision integral SSA_NAME in a bb dominated
by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
cast to utype if rhs2 has already a compatible type.

* gcc.dg/tree-ssa/pr69615.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr69615.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-reassoc.c

[Bug tree-optimization/85964] [8/9 Regression] compile time hog w/ -O3 -ftracer -fno-guess-branch-probability

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85964

--- Comment #15 from Richard Biener  ---
On both trunk and branch the tracer induced issue is fixed and the backwards
threading compile-time-hog remains (which may very well be a dup of PR69580).

[Bug tree-optimization/85935] [8 Regression] [graphite] ICE in extract_affine, at graphite-sese-to-poly.c:287

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85935

Richard Biener  changed:

   What|Removed |Added

  Known to work||9.0
Summary|[8/9 Regression] [graphite] |[8 Regression] [graphite]
   |ICE in extract_affine, at   |ICE in extract_affine, at
   |graphite-sese-to-poly.c:287 |graphite-sese-to-poly.c:287
  Known to fail||8.1.0

--- Comment #3 from Richard Biener  ---
Fixed on trunk sofar.

[Bug c++/85885] internal compiler error, gimplify.c related

2018-06-07 Thread hqzhou at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85885

--- Comment #2 from Huiqun Zhou  ---
Hi,


I've tried several version of gcc, here is a brief report:


My OS: CentOS 7 update 5
Target code: lammps 16Mar2018


gcc versionresult
  4.8.5fail
  6.3.1success
  7.2.1fail
  7.3.1fail
  8.1.0uncertain

With gcc 8.1.0, I got a lot of other errors, and failed to make certain
whether the compilation passed the reported error.


Thanks!


Huiqun Zhou
@Earth Sciences, Nanjing University


-- Original --
From:  "rguenth at gcc dot gnu.org";
Date:  Wed, May 23, 2018 07:23 PM
To:  "hqzhou"; 

Subject:  [Bug c++/85885] internal compiler error, gimplify.c related


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

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-05-23
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Please try newer GCC and please attach preprocessed source as indicated by
https://gcc.gnu.org/bugs.html

[Bug tree-optimization/85935] [8/9 Regression] [graphite] ICE in extract_affine, at graphite-sese-to-poly.c:287

2018-06-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85935

--- Comment #2 from Richard Biener  ---
Author: rguenth
Date: Thu Jun  7 07:01:56 2018
New Revision: 261263

URL: https://gcc.gnu.org/viewcvs?rev=261263=gcc=rev
Log:
2018-06-07  Richard Biener  

PR tree-optimization/85935
* graphite-scop-detection.c (find_params_in_bb): Analyze
condition operands with respect to the correct loop.  Assert
the analysis doesn't fail.

* gcc.dg/graphite/pr85935.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/graphite/pr85935.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/graphite-scop-detection.c
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/86078] Documentation: missing param default values

2018-06-07 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86078

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||documentation
  Component|web |middle-end

--- Comment #1 from Andrew Pinski  ---
params are not designed for every day user of GCC.  They are designed to make
it is easier to debug GCC heuristics and tune them easier.

[Bug web/86078] New: Documentation: missing param default values

2018-06-07 Thread ptdrnvqd at 10mail dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86078

Bug ID: 86078
   Summary: Documentation: missing param default values
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: web
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ptdrnvqd at 10mail dot org
  Target Milestone: ---

in
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
or https://gcc.gnu.org/onlinedocs/gcc-5.5.0/gcc/Optimize-Options.html
or whatever number,
 the params section at the bottom does not link/reference
source-code e.g. https://github.com/gcc-mirror/gcc/blob/master/gcc/params.def
it contains max,min and default values, along with description, includes
default values not mentioned in documentation, along with disagreements

e.g.
sched-state-edge-prob-cutoff in docs(gcc6+) changes
name, err correction, but not reflected|updated in older doc versions

could this be automated/scripted (link to source-code) to reduce human errors?


missing default doc

max-crossjump-edges=100
max-delay-slot-insn-search=100
max-delay-slot-live-search=333
max-gcse-memory=50*1024*1024  (2015)
max-gcse-memory=128*1024*1024  (2018)
max-modulo-backtrack-attempts=40
iv-consider-all-candidates-bound=30(2015)
iv-consider-all-candidates-bound=40(2018)
iv-max-considered-uses=250
scev-max-expr-size=100
scev-max-expr-complexity=10
max-partial-antic-length=100
devirt-type-list-size(4.6),ipa-cp-value-list-size(4.7+)=8
max-slsr-cand-scan=50(4.8+)
ipa-max-agg-items=16(4.9+)
ipa-max-aa-steps=25000(5+)
max-ssa-name-query-depth=3(6+)
max-speculative-devirt-maydefs=50(6+)
max-stores-to-merge=64(7+)
dse-max-object-size=256(7+)


Not mentioned @docs except SourceCode 
max-tracked-strlens=1


what impact do they have,
anyway to emit debug info to show whether compilation hit limits?

to generalize, for benchmarks should an average of params be used?

should gcc params better reflect the host-compile-machine instead of a
one-size-fits all (compiling on mobile|desktop|workstation|server, new|old)

another question: when compiling using link-time-optimization-LTO, 
since it's bunched into a single unit would it hit the limits sooner and should
it be compensated for against

any mechanism for compile more/less aggressively based on usage patters, how
much (CPU-time|usage/day) a program uses (relevance)

[Bug pending/86077] gcc does not recognize --param key=value when surrounded by single quotes

2018-06-07 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86077

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski  ---
this is standard unix option processing.  That is --param and key=value are two
different arguments.

This should be fixed in bazel really.  There are other arguments like --param
really.  -Xlinker, -Xassembler, and -Xpreprocessor .