[Bug target/1078] Problems with attributes documentation

2016-01-01 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1078

--- Comment #8 from sandra at gcc dot gnu.org ---
Author: sandra
Date: Sat Jan  2 03:45:32 2016
New Revision: 232034

URL: https://gcc.gnu.org/viewcvs?rev=232034=gcc=rev
Log:
2016-01-01  Sandra Loosemore  

PR 1078

gcc/
* extend.texi (Common Function Attributes) : New.
* invoke.texi (Code Gen Options) <-fno-stack-limit>: Add pointer
to corresponding attribute.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/extend.texi
trunk/gcc/doc/invoke.texi

[Bug rtl-optimization/69117] New: wrong code at -Os and above on x86_64-linux-gnu

2016-01-01 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69117

Bug ID: 69117
   Summary: wrong code at -Os and above on x86_64-linux-gnu
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The current gcc trunk mis-compiles the following code on x86_64-linux-gnu at
-Os and above in both 32-bit and 64-bit modes.

This is a regression from 5.3.x. 


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20160101 (experimental) [trunk revision 232023] (GCC) 
$ 
$ gcc-trunk -O1 small.c; ./a.out
$ gcc-5.3 -Os small.c; ./a.out
$ 
$ gcc-trunk -Os small.c
$ ./a.out
Aborted (core dumped)
$ 





int a, c, *d = , **e = , *g = 
static int ***b, **f = 

int
main ()
{
  **f = 0;
  int h = 0;
  if (c) 
{
  *h =  
  ***b = 0;
}
  *e = g;

  if (d != )
__builtin_abort ();

  return 0;
}

[Bug tree-optimization/69117] wrong code at -Os and above

2016-01-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69117

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||alias, wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-02
  Component|rtl-optimization|tree-optimization
   Target Milestone|--- |6.0
Summary|wrong code at -Os and above |wrong code at -Os and above
   |on x86_64-linux-gnu |
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed also happens on aarch64-linux-gnu.

-O1 -fstrict-aliasing is enough to reproduce the failure.

[Bug libitm/69115] New: transactional memory attributes are missing docs and inconsistent with spec

2016-01-01 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69115

Bug ID: 69115
   Summary: transactional memory attributes are missing docs and
inconsistent with spec
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libitm
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sandra at gcc dot gnu.org
  Target Milestone: ---

I found this issue while checking for undocumented attributes in connection
with PR 1078.

These attributes defined in c-family/c-common.c have no documentation in
extend.texi:

transaction_callable
transaction_may_cancel_outer
transaction_pure
transaction_safe
transaction_safe_dynamic
transaction_unsafe
transaction_wrap

I was thinking it would be OK to just list them in the manual and point at the
specification found here for details:

https://sites.google.com/site/tmforcplusplus/

but

transaction_pure, transaction_safe_dynamic, and transaction_wrap are not
documented in the spec.

In trying to sort out which of these are function attributes and which are type
attributes, I also found:

The spec says transaction_safe, transaction_unsafe, and transaction_callable
can be used on classes, but the implementation only checks for transaction_safe
and transaction_callable.

The spec says transaction_callable can only apply to a function
definition/declaration and can't be associated with a pointer-to-function, but
it doesn't look like the implementation imposes that restriction.

I think it would be helpful if someone familiar with the code could clarify if
these differences are intentional and useful, and draft the missing
documentation.

[Bug target/69014] [4.9/5/6 Regression] gcc.c-torture/execute/991023-1.c FAILs with -Os -fmodulo-sched -fno-tree-vrp

2016-01-01 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69014

--- Comment #9 from Jeffrey A. Law  ---
blah_lsm.4_3 has a known constant value (1), so it should have propagated into
the PHI node at the start of BB5, but that in and of itself probably doesn't
account for the code quality regression.

-Os might be inhibiting jump threading.  I don't recall specifically when the
threading through joiner blocks went in, nor the later tweak to not do that
when -Os is in effect.  But if we allowed threading through the joiner in 4.8,
but not in 4.9 with -Os, that might explain the difference.

[Bug fortran/69101] IEEE_SELECTED_REAL_KIND is not generic

2016-01-01 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69101

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org
Summary|ICE when compiling some |IEEE_SELECTED_REAL_KIND is
   |tests in gfortran.dg/ieee/  |not generic
   |with -fdefault-integer-8 or |
   |-finteger-4-integer-8   |

--- Comment #3 from kargl at gcc dot gnu.org ---
To use IEEE_SELECTED_REAL_KIND in an initialization expression
with arbitrary integer kind type parameter requires a rewrite
of simplify_ieee_selected_real_kind in simplify.c.  This isn't
too terribly hard.

The fix for the use of IEEE_SELECTED_REAL_KIND as a generic
intrinsic subprogram in a non-initialization expression appears
to be much more difficult.  It probably means that 125 explicit
interfaces need to be added to the IEEE_ARITHMETIC module.  I
won't pursue this avenue.

[Bug libstdc++/69116] New: compile error when including valarray

2016-01-01 Thread gnu at gonsoe dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69116

Bug ID: 69116
   Summary: compile error when including valarray
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gnu at gonsoe dot com
  Target Milestone: ---

The following code does not compile with gcc4.8.4 or gcc5.2.1.  I have access
to an older 4.8.0 compiler where the code compiles ok, so this appears to be a
regression.  

The inclusion of  causes the compile error.

#include 
#include 

struct x : public std::ostream
{
  virtual void flush() = 0;
};
void foo(x& os)
{
  os << std::endl;
}

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.4-2ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--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-4.8-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-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 --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 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-std=c++11' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -E -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE va.cxx -mtune=generic -march=x86-64 -std=c++11
-fpch-preprocess -fstack-protector -Wformat -Wformat-security -o va.ii
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.8"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.8
 /usr/include/x86_64-linux-gnu/c++/4.8
 /usr/include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-std=c++11' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -fpreprocessed va.ii -quiet
-dumpbase va.cxx -mtune=generic -march=x86-64 -auxbase va -std=c++11 -version
-fstack-protector -Wformat -Wformat-security -o va.s
GNU C++ (Ubuntu 4.8.4-2ubuntu1~14.04) version 4.8.4 (x86_64-linux-gnu)
compiled by GNU C version 4.8.4, GMP version 5.1.3, MPFR version
3.1.2-p3, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Ubuntu 4.8.4-2ubuntu1~14.04) version 4.8.4 (x86_64-linux-gnu)
compiled by GNU C version 4.8.4, GMP version 5.1.3, MPFR version
3.1.2-p3, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9cb21c615435621dce26fe5e793192fd
In file included from va.cxx:2:0:
/usr/include/c++/4.8/valarray: In instantiation of ‘class std::valarray’:
va.cxx:10:14:   required from here
/usr/include/c++/4.8/valarray:926:5: error: cannot allocate an object of
abstract type ‘x’
 valarray<_Tp>::sum() const
 ^
va.cxx:4:8: note:   because the following virtual functions are pure within
‘x’:
 struct x : public std::ostream
^
va.cxx:6:16: note:  virtual void x::flush()
   virtual void flush() = 0;
^
In file included from va.cxx:2:0:
/usr/include/c++/4.8/valarray:1033:5: error: cannot allocate an object of
abstract type ‘x’
 valarray<_Tp>::min() const
 ^
va.cxx:4:8: note:   since type ‘x’ has pure virtual functions
 struct x : public std::ostream
^
In file included from va.cxx:2:0:
/usr/include/c++/4.8/valarray:1041:5: error: cannot allocate an object of
abstract type ‘x’
 valarray<_Tp>::max() const
 ^
va.cxx:4:8: note:   since type ‘x’ has pure virtual functions
 struct x : public std::ostream
^
In file included from va.cxx:2:0:
/usr/include/c++/4.8/valarray:1049:5: error: cannot allocate an object of
abstract type ‘x’
 valarray<_Tp>::apply(_Tp 

[Bug fortran/69064] [5/6 Regression] ICE: in gfc_typenode_for_spec, at fortran/trans-types.c:1062 when LEN is set to a variable with no explicit type

2016-01-01 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69064

--- Comment #48 from kargl at gcc dot gnu.org ---
Fairly trivial to fix once one finds

F2003, p. 126.

A variable in a specification expression shall have its type and
type parameters, if any, specified by a previous declaration in
the same scoping unit, by the implicit typing rules in effect for
the scoping unit, or by host or use association.

Note, the fix requires adjusting 2 testcases for new error
conditions and fixing 1 testcase that actually has invalid
code.

[Bug target/66655] [5/6 Regression] miscompilation due to ipa-ra on MinGW

2016-01-01 Thread tony at kelman dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66655

Tony Kelman  changed:

   What|Removed |Added

 CC||tony at kelman dot net

--- Comment #6 from Tony Kelman  ---
I applied Nick's patch to OpenSUSE's build of mingw64-gcc 5.3.0 here:
https://build.opensuse.org/package/show/home:kelman:branches:windows:mingw:win64/mingw64-gcc

And the resulting build did not exhibit the abort in the original test case,
whereas the unpatched build at
https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-gcc does
reproduce the abort.

[Bug target/1078] Problems with attributes documentation

2016-01-01 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1078

--- Comment #9 from sandra at gcc dot gnu.org ---
"no_stack_limit" is documented now.

I've proposed deleting "com_interface", as it's been obsolete since 2001:
https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00011.html

It looks like the only target-inspecific attributes missing documentation are
the transactional memory attributes.  I filed a separate issue (PR 69115) for
that since it requires clarification from the experts on that feature.

I have not reviewed the state of the target-specific attribute documentation
yet.

[Bug tree-optimization/69108] New: ICE in gather_scalar_reductions with -ftree-parallelize-loops=2

2016-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69108

Bug ID: 69108
   Summary: ICE in gather_scalar_reductions with
-ftree-parallelize-loops=2
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

...
$ gcc -O2 src/gcc/testsuite/gcc.dg/graphite/interchange-2.c -S
-ftree-parallelize-loops=2 
src/gcc/testsuite/gcc.dg/graphite/interchange-2.c: In function ‘foo.constprop’:
src/gcc/testsuite/gcc.dg/graphite/interchange-2.c:13:1: internal compiler
error: in as_a, at is-a.h:192
 foo (int N, int *res)
 ^~~

0x89e14b gphi* as_a(gimple*)
/home/vries/gcc_versions/devel/src/gcc/is-a.h:192
0xfd7915 gather_scalar_reductions
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2477
0xfd7c4c try_create_reduction_list
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2549
0xfd8542 parallelize_loops
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2726
0xfd8835 execute
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2797
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
...

[Bug tree-optimization/68967] Build and test parloops on by default

2016-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68967

--- Comment #8 from vries at gcc dot gnu.org ---
Managed an all-languages bootstrap and reg-test with --disable-multilib using
this patch series, in combination with tentative patches for the first four of
the following problems in order to be able to complete the build.

Found and filed:
- PR69039 [6 regression] segfault with ftree-parallelize-loops=2
- PR69058 segfault with ftree-parallelize-loops=2 in
libgo/go/strconv/decimal.go
- PR69062 invalid PHI argument error with ftree-parallelize-loops=2
- PR69069 missing phi argument with -ftree-parallelize-loops=2
- PR69107 def does not dominate use ICE with -O2 -ftree-paralellize-loops=2
- PR69108 ICE in gather_scalar_reductions with -ftree-parallelize-loops=2
- PR69109 missing phi argument ICE in transform_to_exit_first_loop_alt with
  -ftree-parallelize-loops=2
- PR69110 execution failure in gcc.c-torture/execute/doloop-2.c with
  -ftree-parallelize-loops=2

[Bug tree-optimization/69110] New: execution failure in gcc.c-torture/execute/doloop-2.c with -ftree-parallelize-loops=2

2016-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69110

Bug ID: 69110
   Summary: execution failure in gcc.c-torture/execute/doloop-2.c
with -ftree-parallelize-loops=2
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Passes with -ftree-parallelize-loops=0:
...
$ gcc src/gcc/testsuite/gcc.c-torture/execute/doloop-2.c -O1
-ftree-parallelize-loops=0 -Wl,-rpath=$(pwd -P)/install/lib64
$ ./a.out 
$
...

Fails with -ftree-parallelize-loops=2:
...
$ gcc src/gcc/testsuite/gcc.c-torture/execute/doloop-2.c -O1
-ftree-parallelize-loops=2 -Wl,-rpath=$(pwd -P)/install/lib64
$ ./a.out 
Aborted (core dumped)
$
...

[Bug c++/69111] New: Problem with expansion of a parameter pack of templates

2016-01-01 Thread realloc at outlook dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69111

Bug ID: 69111
   Summary: Problem with expansion of a parameter pack of
templates
   Product: gcc
   Version: 5.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: realloc at outlook dot de
  Target Milestone: ---

Created attachment 37203
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37203=edit
full example

it seems a pattern for parameter pack expansion is not recognized, if the
pattern is an alias template inside a template class, which takes the parameter
pack as an argument.

version: g++ (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010
os: Ubuntu 15.10
system: Kernel 4.3.0-040300rc6-generic x86_64 GNU/Linux

results of compilation attempt:

-
g++ -std=c++14 -o test testcase.cpp

testcase.cpp:18:56: error: parameter packs not expanded with ‘...’:
  using type = template_list;
^
testcase.cpp:18:56: note: ‘Types’
-

clang 3.6.2-1 compiles successfully:
-
clang++ -std=c++14 -o test testcase.cpp
-

full compilation example:
-
g++ -v -save-temps -std=c++14 -o test testcase.cpp

Using built-in specs.
COLLECT_GCC=g++
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.2.1-22ubuntu2'
--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.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++14' '-o' 'test'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -E -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE testcase.cpp -mtune=generic -march=x86-64
-std=c++14 -fpch-preprocess -fstack-protector-strong -Wformat -Wformat-security
-o testcase.ii
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/5
 /usr/include/x86_64-linux-gnu/c++/5
 /usr/include/c++/5/backward
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++14' '-o' 'test'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -fpreprocessed testcase.ii -quiet
-dumpbase testcase.cpp -mtune=generic -march=x86-64 -auxbase testcase
-std=c++14 -version -fstack-protector-strong -Wformat -Wformat-security -o
testcase.s
GNU C++14 (Ubuntu 5.2.1-22ubuntu2) version 5.2.1 20151010 (x86_64-linux-gnu)
compiled by GNU C version 5.2.1 20151010, GMP version 6.0.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++14 (Ubuntu 5.2.1-22ubuntu2) version 5.2.1 20151010 (x86_64-linux-gnu)
compiled by GNU C version 5.2.1 20151010, GMP version 6.0.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 5ed623d6fe11f4bcc1afee70f77e33b0
testcase.cpp:18:56: error: parameter packs not expanded with ‘...’:
  using type = template_list;
   

[Bug tree-optimization/69107] New: def does not dominate use ICE with -O2 -ftree-paralellize-loops=2

2016-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69107

Bug ID: 69107
   Summary: def does not dominate use ICE with -O2
-ftree-paralellize-loops=2
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

...
$ gcc src/gcc/testsuite/gcc.c-torture/compile/pr32399.c -O3 -S
-ftree-parallelize-loops=2
src/gcc/testsuite/gcc.c-torture/compile/pr32399.c: In function ‘f’:
src/gcc/testsuite/gcc.c-torture/compile/pr32399.c:1:6: error: definition in
block 11 does not dominate use in block 27
 void f(unsigned char *src, unsigned char *dst, int num, unsigned char *pos,
unsigned char *diffuse, int hasdiffuse, unsigned char *specular, int
hasspecular) {
  ^

for SSA_NAME: .MEM_62 in statement:
.MEM_97 = PHI <.MEM_62(27)>
PHI argument
.MEM_62
for PHI node
.MEM_97 = PHI <.MEM_62(27)>
src/gcc/testsuite/gcc.c-torture/compile/pr32399.c:1:6: internal compiler error:
verify_ssa failed
0x1176e2d verify_ssa(bool, bool)
/home/vries/gcc_versions/devel/src/gcc/tree-ssa.c:1039
0xfd157b checking_verify_ssa
/home/vries/gcc_versions/devel/src/gcc/tree-ssa.h:87
0xfd55e0 transform_to_exit_first_loop_alt
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:1755
0xfd5b37 try_transform_to_exit_first_loop_alt
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:1870
0xfd728f gen_parallel_loop
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2304
0xfd88fc parallelize_loops
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2792
0xfd8a91 execute
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2846
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
...

[Bug tree-optimization/69109] New: missing phi argument ICE in transform_to_exit_first_loop_alt with -ftree-parallelize-loops=2

2016-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69109

Bug ID: 69109
   Summary: missing phi argument ICE in
transform_to_exit_first_loop_alt with
-ftree-parallelize-loops=2
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

...
$ gcc src/gcc/testsuite/gcc.dg/vect/unswitch-loops-pr26969.c -O2
-funswitch-loops -S -ftree-parallelize-loops=2
src/gcc/testsuite/gcc.dg/vect/unswitch-loops-pr26969.c: In function
‘ruby_re_compile_fastmap’:
src/gcc/testsuite/gcc.dg/vect/unswitch-loops-pr26969.c:5:1: error: PHI argument
is missing for edge 10->9
 ruby_re_compile_fastmap (char *fastmap, int options)
 ^~~

for PHI node
.MEM_2 = PHI <(10)>
src/gcc/testsuite/gcc.dg/vect/unswitch-loops-pr26969.c:5:1: internal compiler
error: verify_ssa failed
0x1176bd1 verify_ssa(bool, bool)
/home/vries/gcc_versions/devel/src/gcc/tree-ssa.c:1039
0xfd1539 checking_verify_ssa
/home/vries/gcc_versions/devel/src/gcc/tree-ssa.h:87
0xfd559e transform_to_exit_first_loop_alt
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:1755
0xfd586f try_transform_to_exit_first_loop_alt
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:1799
0xfd71e8 gen_parallel_loop
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2299
0xfd86bb parallelize_loops
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2747
0xfd8835 execute
/home/vries/gcc_versions/devel/src/gcc/tree-parloops.c:2797
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
...

[Bug tree-optimization/68967] Build and test parloops on by default

2016-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68967

--- Comment #9 from vries at gcc dot gnu.org ---
(In reply to vries from comment #8)
> Managed an all-languages bootstrap and reg-test with --disable-multilib
> using this patch series, in combination with tentative patches for the first
> four of the following problems in order to be able to complete the build.

Though at the end, make check hung in fix-include. Still, AFAICT I've managed
to run all of the tests:
...
./gcc/testsuite/go/go.sum
./gcc/testsuite/gnat/gnat.sum
./gcc/testsuite/objc/objc.sum
./gcc/testsuite/obj-c++/obj-c++.sum
./gcc/testsuite/ada/acats/acats.sum
./gcc/testsuite/gfortran/gfortran.sum
./gcc/testsuite/gcc/gcc.sum
./gcc/testsuite/g++/g++.sum
./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.sum
./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.sum
./x86_64-pc-linux-gnu/boehm-gc/testsuite/boehm-gc.sum
./x86_64-pc-linux-gnu/libffi/testsuite/libffi.sum
./x86_64-pc-linux-gnu/libitm/testsuite/libitm.sum
./x86_64-pc-linux-gnu/libgo/libgo.sum
./x86_64-pc-linux-gnu/libjava/testsuite/libjava.sum
./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.sum
...

[Bug tree-optimization/69070] [6 Regression] ICE: tree check: expected real_cst, have ssa_name in gimple_expand_builtin_pow, at tree-ssa-math-opts.c:1541 with -fsignaling-nans and powl()

2016-01-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69070

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Fri Jan  1 11:55:59 2016
New Revision: 232025

URL: https://gcc.gnu.org/viewcvs?rev=232025=gcc=rev
Log:
PR tree-optimization/69070
* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Only test
REAL_VALUE_ISSIGNALING_NAN on arg0 if arg0 is a REAL_CST.

* gcc.dg/pr69070.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr69070.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-math-opts.c

[Bug sanitizer/69055] Internal compiler error -fsanitize=float-cast-overflow

2016-01-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69055

--- Comment #9 from Jakub Jelinek  ---
Author: jakub
Date: Fri Jan  1 11:55:02 2016
New Revision: 232024

URL: https://gcc.gnu.org/viewcvs?rev=232024=gcc=rev
Log:
PR sanitizer/69055
* ubsan.c (ubsan_instrument_float_cast): Call
initialize_sanitizer_builtins.

* gfortran.dg/pr69055.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr69055.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/ubsan.c

[Bug tree-optimization/69070] [6 Regression] ICE: tree check: expected real_cst, have ssa_name in gimple_expand_builtin_pow, at tree-ssa-math-opts.c:1541 with -fsignaling-nans and powl()

2016-01-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69070

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Fixed.

[Bug sanitizer/69055] Internal compiler error -fsanitize=float-cast-overflow

2016-01-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69055

--- Comment #10 from Jakub Jelinek  ---
Fixed for GCC 6+ so far.

[Bug c++/69113] New: [6 Regression] ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak

2016-01-01 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69113

Bug ID: 69113
   Summary: [6 Regression] ICE: in vague_linkage_p, at
cp/decl2.c:1875 with -fno-weak
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu

Created attachment 37205
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37205=edit
reduced testcase

Compiler output:
$ gcc testcase.C -fno-weak
testcase.C: In static member function 'static void foo::bar()::baz::m()':
testcase.C:9:13: internal compiler error: in vague_linkage_p, at
cp/decl2.c:1875
  static int n;
 ^

0x6ca3f6 vague_linkage_p(tree_node*)
/repo/gcc-trunk/gcc/cp/decl2.c:1875
0x5fe8cc maybe_commonize_var(tree_node*)
/repo/gcc-trunk/gcc/cp/decl.c:5332
0x61ebaf cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
/repo/gcc-trunk/gcc/cp/decl.c:6841
0x722d88 cp_parser_init_declarator
/repo/gcc-trunk/gcc/cp/parser.c:18601
0x72342e cp_parser_simple_declaration
/repo/gcc-trunk/gcc/cp/parser.c:12324
0x7238d4 cp_parser_block_declaration
/repo/gcc-trunk/gcc/cp/parser.c:12200
0x724948 cp_parser_declaration_statement
/repo/gcc-trunk/gcc/cp/parser.c:11812
0x6fc70a cp_parser_statement
/repo/gcc-trunk/gcc/cp/parser.c:10494
0x6fcfc1 cp_parser_statement_seq_opt
/repo/gcc-trunk/gcc/cp/parser.c:10772
0x6fd0c3 cp_parser_compound_statement
/repo/gcc-trunk/gcc/cp/parser.c:10726
0x7214a0 cp_parser_function_body
/repo/gcc-trunk/gcc/cp/parser.c:20594
0x7214a0 cp_parser_ctor_initializer_opt_and_function_body
/repo/gcc-trunk/gcc/cp/parser.c:20630
0x7221bf cp_parser_function_definition_after_declarator
/repo/gcc-trunk/gcc/cp/parser.c:25257
0x728b24 cp_parser_late_parsing_for_member
/repo/gcc-trunk/gcc/cp/parser.c:26100
0x6fa5a9 cp_parser_class_specifier_1
/repo/gcc-trunk/gcc/cp/parser.c:21465
0x6fa5a9 cp_parser_class_specifier
/repo/gcc-trunk/gcc/cp/parser.c:21491
0x6fa5a9 cp_parser_type_specifier
/repo/gcc-trunk/gcc/cp/parser.c:15789
0x71743b cp_parser_decl_specifier_seq
/repo/gcc-trunk/gcc/cp/parser.c:12710
0x723251 cp_parser_simple_declaration
/repo/gcc-trunk/gcc/cp/parser.c:12253
0x7238d4 cp_parser_block_declaration
/repo/gcc-trunk/gcc/cp/parser.c:12200
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


Tested revisions:
trunk r231954 - ICE
5-branch r231950 - OK
4_9-branch r231949 - OK
4_8-branch r224828 - OK

[Bug libstdc++/69114] New: A couple allocator-related helpers should use __addressof

2016-01-01 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69114

Bug ID: 69114
   Summary: A couple allocator-related helpers should use
__addressof
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rs2740 at gmail dot com
  Target Milestone: ---

__use_alloc in  and __outermost in 
take the address of an allocator with &. They should use __addressof instead.

(__outermost doesn't seem to actually require the actual address at all; the
result is only used for disambiguating overload resolution.)

[Bug target/69112] New: MIssing register assignment

2016-01-01 Thread ysato at users dot sourceforge.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69112

Bug ID: 69112
   Summary: MIssing register assignment
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ysato at users dot sourceforge.jp
  Target Milestone: ---

Created attachment 37204
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37204=edit
reproduce sample

I compiled this inline assembler functions.
__asm__ volatile("mvfc psw, %2\n\t"
 "clrpsw i\n\t"
 "btst %3, %1.b\n\t"
 "bset %3, %1.b\n\t"
 "scnz.l %0\n\t"
 "mvtc %2, psw"
 : "=r"(result),"+m"(*b_addr),"=r"(psw)
 :"ri"(nr & 7):"cc");

I got this result. The result which isn't expected.
%2 and %3 is same...
rx-elf-gcc -Os
mvfc psw, r1
clrpsw i
btst r1, [r2].b
bset r1, [r2].b
scnz.l r15
mvtc r1, psw

"-O2" is good.
mvfc psw, r2
clrpsw i
btst r4, [r14].b
bset r4, [r14].b
scnz.l r4
mvtc r2, psw

Attached reproduce source.

[Bug target/69112] MIssing register assignment

2016-01-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69112

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
You need to mark "=r"(psw) as an early clobber.

That is:
"="(psw)

[Bug target/69015] ICE: RTL check: expected code 'code_label', have 'return' in find_cond_trap, at ifcvt.c:3715 with -fno-if-conversion and __builtin_trap()

2016-01-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69015

--- Comment #4 from Jakub Jelinek  ---
Fixed for GCC 6+ so far.

[Bug target/69112] MIssing register assignment

2016-01-01 Thread ysato at users dot sourceforge.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69112

--- Comment #2 from Yoshinori Sato  ---
OK.
Thanks.

[Bug testsuite/68917] test suite failure for builtin-bitops-1.c

2016-01-01 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68917

--- Comment #6 from Bernd Edlinger  ---
Author: edlinger
Date: Fri Jan  1 18:45:41 2016
New Revision: 232028

URL: https://gcc.gnu.org/viewcvs?rev=232028=gcc=rev
Log:
PR target/68917
* config/tilegx/tilegx.md (clzsi2): Don't create DI subregs of
SI values.  Explicitly convert SI to DI and vice-versa.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/tilegx/tilegx.md

[Bug libfortran/68867] numeric formatting problem in the fortran library

2016-01-01 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68867

Jerry DeLisle  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #25 from Jerry DeLisle  ---
Closing after adjusting test case.

[Bug target/68917] test suite failure for builtin-bitops-1.c

2016-01-01 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68917

Bernd Edlinger  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-01
  Component|testsuite   |target
   Assignee|unassigned at gcc dot gnu.org  |bernd.edlinger at 
hotmail dot de
 Ever confirmed|0   |1

[Bug libfortran/68867] numeric formatting problem in the fortran library

2016-01-01 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68867

--- Comment #26 from Jerry DeLisle  ---
Author: jvdelisle
Date: Fri Jan  1 19:01:24 2016
New Revision: 232029

URL: https://gcc.gnu.org/viewcvs?rev=232029=gcc=rev
Log:
2016-01-01  Jerry DeLisle  

PR libgfortran/68867
* gfortran.dg/default_format_denormal_2.f90: Fix the dg regular
expression.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90

[Bug fortran/64522] [4.9 Regression] Free-form source code: -Wline-truncation is no longer enabled by default

2016-01-01 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64522

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Dominique d'Humieres  ---
> Fixed on 5.2 and trunk (6.0). IMO backporting r219424 to 4.9.4 does not
> worth the work. Unless someone objects (and do the work), I'll close this PR
> as FIXED.

No objection, closing.

[Bug fortran/31067] MINLOC should sometimes be inlined (gas_dyn is sooooo sloooow)

2016-01-01 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31067

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #48 from Dominique d'Humieres  ---
> Is there anything left in this PR or could it be closed as FIXED?

No feedback, closing. Please open new PR(s) for remaining issue(s).

[Bug other/64534] invalid -march value incosistency

2016-01-01 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64534

Martin Sebor  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-01
 CC||msebor at gcc dot gnu.org
   Host||x86_64-*-*, i?86-*-*
 Ever confirmed|0   |1
  Known to fail||4.9.2, 5.1.0, 6.0

--- Comment #1 from Martin Sebor  ---
Confirmed:

$ echo | /home/msebor/build/gcc-trunk-svn/gcc/xgcc
-B/home/msebor/build/gcc-trunk-svn/gcc -S -march=foobar -march=core2
-o/dev/null -xc -

$ echo | /home/msebor/build/gcc-trunk-svn/gcc/xgcc
-B/home/msebor/build/gcc-trunk-svn/gcc -S -march=foobar -march=native
-o/dev/null -xc -
:1:0: error: bad value (foobar) for -march= switch

This seems to be due to the special treatment of -march=native by the i386
driver which forces it before any other -march= options, even if they are
specified first on the command line.

[Bug c++/69111] Problem with expansion of a parameter pack of templates

2016-01-01 Thread realloc at outlook dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69111

--- Comment #1 from realloc at outlook dot de ---
Created attachment 37206
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37206=edit
workaround using additional wrappers and simplyfied expansion pattern

Created a workaround which does the same thing with wrappers to simplyfy the
expansion pattern

[Bug libfortran/68987] [5/6 Regression] double free or corruption in _gfortran_st_write_done when a write statement to an internal file uses an invalid format and the ERR= specifier appears.

2016-01-01 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68987

Jerry DeLisle  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jerry DeLisle  ---
Fixed, closing.

[Bug libfortran/68867] numeric formatting problem in the fortran library

2016-01-01 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68867

--- Comment #24 from Jerry DeLisle  ---
Author: jvdelisle
Date: Fri Jan  1 18:13:17 2016
New Revision: 232027

URL: https://gcc.gnu.org/viewcvs?rev=232027=gcc=rev
Log:
2016-01-01  Jerry DeLisle  

PR libgfortran/68867
* gfortran.dg/default_format_denormal_2.f90: XFAIL for all
PowerPC.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90

[Bug c/69086] crealf may be invalid value

2016-01-01 Thread ka_bena at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69086

--- Comment #2 from BENAÏSSA  ---
thank you for your clear answer.comment: And I imagine that it is not possible
to define in C the complex value (inf,inf).                                    
                       A.Benaïssa


Le Mercredi 30 décembre 2015 21h14, pinskia at gcc dot gnu.org
 a écrit :


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

Andrew Pinski  changed:

          What    |Removed                    |Added

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

--- Comment #1 from Andrew Pinski  ---
A1_1 = 1.0e+0 / 0.0;
  A2_2 = 1.0e+0 / 0.0;
  A2.0_3 = A2_2;
  _4 = A2.0_3 * 0.0;
  _5 = _4 + A1_1;
  A3_6 = COMPLEX_EXPR <_5, A2.0_3>;
  _7 = (double) A1_1;
  printf ("%f\n", _7);
  _10 = REALPART_EXPR ;
  _11 = (double) _10;
  printf ("%f\n", _11);
  _13 = (double) A2_2;
  printf ("%f\n", _13);
  _15 = IMAGPART_EXPR ;
  _16 = (double) _15;
  printf ("%f\n", _16);
  _18 = 0;


The reason is more complex than what you think.  Sorry for the pun.  But since
there is no imagine type  A2*1.Fi is really A2*(0 + 1Fi)

So for the real part you get:
A1 + A2 * 0

A2 * 0 is nan as inf * 0 is a nan.

[Bug fortran/68864] [6 Regression] ICE: in gfc_get_descriptor_dimension, at fortran/trans-array.c:268

2016-01-01 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68864

--- Comment #4 from Paul Thomas  ---
Author: pault
Date: Fri Jan  1 17:02:51 2016
New Revision: 232026

URL: https://gcc.gnu.org/viewcvs?rev=232026=gcc=rev
Log:
2016-01-01  Paul Thomas  

PR fortran/68864
* trans-array.c (evaluate_bound): If deferred, test that 'desc'
is an array descriptor before using gfc_conv_descriptor_xxx.


2016-01-01  Paul Thomas  

PR fortran/68864
* gfortran.dg/pr68864.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/pr68864.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/68864] [6 Regression] ICE: in gfc_get_descriptor_dimension, at fortran/trans-array.c:268

2016-01-01 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68864

Paul Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Paul Thomas  ---
Fixed on trunk.

Thanks for the report

Paul