[Bug c++/64080] New: [5.0 regression][C++14]ICE in cxx_eval_store_expression

2014-11-25 Thread lucdanton at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64080

Bug ID: 64080
   Summary: [5.0 regression][C++14]ICE in
cxx_eval_store_expression
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lucdanton at free dot fr

Created attachment 34122
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34122&action=edit
Program exhibiting ICE

GCC version output:
g++-trunk (GCC) 5.0.0 20141126 (experimental)

The attached testcase is mechanically derived from a program
that used to compile. Compilation command together with output:
$ g++-trunk -std=c++14 ice.cpp 
ice.cpp: In instantiation of 'int invoke(Functor, Args&& ...) [with Functor =
plus_assign; Args = {int, int}]':
ice.cpp:18:37:   required by substitution of 'template typename result::type ...>::type uncurry(Functor, Tuple, integer_sequence) [with Functor = plus_assign; Tuple = tuple; int ...Indices = {0, 0};
 = ]'
ice.cpp:27:41:   required by substitution of 'template void zip_with(Functor, Tuples ...)
[with int ...ElementIndices = 0; Functor = plus_assign; Tuples = {tuple};
 = ]'
ice.cpp:38:47:   required from here
ice.cpp:15:54:   in constexpr expansion of
'functor.plus_assign::operator()((* & args#0), (* & args#1))'
ice.cpp:14:5: internal compiler error: in cxx_eval_store_expression, at
cp/constexpr.c:2492
 int invoke(Functor functor,
 ^
0x6d9fdd cxx_eval_store_expression
../../gcc/gcc/cp/constexpr.c:2492
0x6d7916 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.c:2961
0x6d7653 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.c:3192
0x6d795c cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.c:3066
0x6d795c cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.c:3066
0x6d7173 cxx_eval_call_expression
../../gcc/gcc/cp/constexpr.c:1335
0x6d8018 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.c:2877
0x6d9857 is_sub_constant_expr(tree_node*)
../../gcc/gcc/cp/constexpr.c:3436
0x67e92d check_noexcept_r
../../gcc/gcc/cp/except.c:1168
0xc5b6e4 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set*))
../../gcc/gcc/tree.c:11022
0xc5ce08 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set*))
../../gcc/gcc/tree.c:11335
0x67e64f expr_noexcept_p(tree_node*, int)
../../gcc/gcc/cp/except.c:1245
0x67e7b2 finish_noexcept_expr(tree_node*, int)
../../gcc/gcc/cp/except.c:1230
0x5f7f48 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:14832
0x61154d maybe_instantiate_noexcept(tree_node*)
../../gcc/gcc/cp/pt.c:19899
0x62c01f mark_used(tree_node*, int)
../../gcc/gcc/cp/decl2.c:4879
0x5c6079 build_over_call
../../gcc/gcc/cp/call.c:7434
0x5cee51 build_new_function_call(tree_node*, vec**, bool, int)
../../gcc/gcc/cp/call.c:4081
0x693cf9 finish_call_expr(tree_node*, vec**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2392
0x5f9595 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:15148
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug sanitizer/64078] FAIL: c-c++-common/ubsan/object-size-9.c

2014-11-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64078

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
I haven't seen that yet, though presumably it's about how a struct is padded,
so the following might help

diff --git a/gcc/testsuite/c-c++-common/ubsan/object-size-9.c
b/gcc/testsuite/c-c++-common/ubsan/object-size-9.c
index 829c822..97ef1d9 100644
--- a/gcc/testsuite/c-c++-common/ubsan/object-size-9.c
+++ b/gcc/testsuite/c-c++-common/ubsan/object-size-9.c
@@ -35,7 +35,7 @@ f2 (int i)
   return x;
 }

-/* { dg-output "\[^\n\r]*index 12 out of bounds for type 'char
\\\[8\\\]'\[^\n\r]*(\n|\r\n|\r)" { target { c++ } } } */
+/* { dg-output "\[^\n\r]*index 17 out of bounds for type 'char
\\\[8\\\]'\[^\n\r]*(\n|\r\n|\r)" { target { c++ } } } */
 /* { dg-output "\[^\n\r]*store to address \[^\n\r]* with insufficient space
for an object of type 'char'\[^\n\r]*(\n|\r\n|\r)" { target 
 /* { dg-output "\[^\n\r]*note: pointer points here\[^\n\r]*(\n|\r\n|\r)" {
target { c++ } } } */
 /* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" { target { c++ } } } */
@@ -64,7 +64,7 @@ f4 (int i)
   return s.d[i].b;
 }

-/* { dg-output "\[^\n\r]*index 12 out of bounds for type 'U
\\\[10\\\]'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*index 17 out of bounds for type 'U
\\\[10\\\]'\[^\n\r]*(\n|\r\n|\r)" } */
 /* { dg-output "\[^\n\r]*load of address \[^\n\r]* with insufficient space for
an object of type 'unsigned int'\[^\n\r]*(\n|\r\n|\r)" } 
 /* { dg-output "\[^\n\r]*note: pointer points here\[^\n\r]*(\n|\r\n|\r)" } */
 /* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" } */
@@ -86,12 +86,12 @@ f5 (int i)
 int
 main (void)
 {
-  f1 (t, 12);
+  f1 (t, 17);
 #ifdef __cplusplus
-  f2 (12);
-  f3 (12);
+  f2 (17);
+  f3 (17);
 #endif
-  f4 (12);
-  f5 (12);
+  f4 (17);
+  f5 (17);
   return 0;
 }


[Bug c++/64079] New: pragma GCC diagnostic ignored "-Wunused-function" has incorrect scope

2014-11-25 Thread woodroof at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64079

Bug ID: 64079
   Summary: pragma GCC diagnostic ignored "-Wunused-function" has
incorrect scope
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: woodroof at gmail dot com

Created attachment 34121
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34121&action=edit
preprocessed file

Regression from 4.8.x

Warning "-Wunused-function" is generated even if 
#pragma GCC diagnostic ignored "-Wunused-function"
is defined in place where function is declared/defined.

If there is no "pragma GCC diagnostic push/pop", no warning is generated, even
if "pragma GCC diagnostic ignored" is located at the end of a compilation unit.

*Command line*: g++ -Wall bug.cpp

*Compiler output*:
bug.cpp:11:13: warning: ‘void bar()’ defined but not used [-Wunused-function]
 static void bar() {}
 ^
bug.cpp:7:6: warning: ‘void {anonymous}::foo()’ defined but not used
[-Wunused-function]
 void foo() {}
  ^

*Version*:
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9.2-0ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--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.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-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 4.9.2 (Ubuntu 4.9.2-0ubuntu1~14.04)

[Bug target/62040] internal compiler error: in simplify_const_unary_operation, at simplify-rtx.c:1555

2014-11-25 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62040

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #10 from Andrew Pinski  ---
Fixed.


[Bug target/63691] GCC 4.9.x fails to build GLIBC 2.20 on HPPA

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63691

--- Comment #14 from John David Anglin  ---
__builtin_trap () support added to PA.


[Bug bootstrap/63703] [4.9.2/5 Regression] Bootstrap broken on powerpc-apple-darwin, cc1: internal compiler error: in init_reg_sets

2014-11-25 Thread larryv at macports dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703

--- Comment #20 from Lawrence Velázquez  ---
(In reply to Lawrence Velázquez from comment #19)
> I assume this didn't make it into a 4.8 release?

That the bug didn't make it, I mean.

[Bug bootstrap/63703] [4.9.2/5 Regression] Bootstrap broken on powerpc-apple-darwin, cc1: internal compiler error: in init_reg_sets

2014-11-25 Thread larryv at macports dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703

--- Comment #19 from Lawrence Velázquez  ---
I assume this didn't make it into a 4.8 release?

[Bug target/61359] GCC Bootstrap comparison failures on hppa2.0w-hp-hpux11.23

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61359

John David Anglin  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #4 from John David Anglin  ---
No response.


[Bug jit/64018] JIT tutorial does not describe error-handling

2014-11-25 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64018

dmalcolm at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-11-26
 Ever confirmed|0   |1

--- Comment #1 from dmalcolm at gcc dot gnu.org ---
Patch posted as:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03225.html


[Bug jit/64020] jit misses sin/cos optimizations

2014-11-25 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64020

--- Comment #5 from dmalcolm at gcc dot gnu.org ---
(In reply to dmalcolm from comment #4)
> Am testing a candidate patch for this

Patch posted as:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03229.html


[Bug target/59710] Nios2: Missing gprel optimization

2014-11-25 Thread sandra at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59710

Sandra Loosemore  changed:

   What|Removed |Added

 CC||sandra at codesourcery dot com

--- Comment #1 from Sandra Loosemore  ---
I'm working on a patch that will fix this by adding some additional choices for
-mgpopt.


[Bug sanitizer/64078] New: FAIL: c-c++-common/ubsan/object-size-9.c

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64078

Bug ID: 64078
   Summary: FAIL: c-c++-common/ubsan/object-size-9.c
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

On Linux/x86-64, I got

FAIL: c-c++-common/ubsan/object-size-9.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  output pattern test, is
c-c++-common/ubsan/object-size-9.c:21:11: runtime error: load of address
0x7fffbe9defec with insufficient space for an object of type 'char'

at random.


[Bug bootstrap/63573] [5 Regression] libgo: ICE building libgo on powerpc-linux-gnu

2014-11-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63573

--- Comment #23 from Jonathan Wakely  ---
Created attachment 34120
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34120&action=edit
preprocessed source reproducing the ICE

I'm still seeing this with the attached input.

/home/jwakely/build-abi/./gcc/xgcc -shared-libgcc
-B/home/jwakely/build-abi/./gcc -nostdinc++
-L/home/jwakely/build-abi/powerpc64-unknown-linux-gnu/32/libstdc++-v3/src
-L/home/jwakely/build-abi/powerpc64-unknown-linux-gnu/32/libstdc++-v3/src/.libs
-L/home/jwakely/build-abi/powerpc64-unknown-linux-gnu/32/libstdc++-v3/libsupc++/.libs
-B/home/jwakely/gcc/5/powerpc64-unknown-linux-gnu/bin/
-B/home/jwakely/gcc/5/powerpc64-unknown-linux-gnu/lib/ -isystem
/home/jwakely/gcc/5/powerpc64-unknown-linux-gnu/include -isystem
/home/jwakely/gcc/5/powerpc64-unknown-linux-gnu/sys-include -m32
-I/home/jwakely/src/gcc/libstdc++-v3/../libgcc
-I/home/jwakely/build-abi/powerpc64-unknown-linux-gnu/32/libstdc++-v3/include/powerpc64-unknown-linux-gnu
-I/home/jwakely/build-abi/powerpc64-unknown-linux-gnu/32/libstdc++-v3/include
-I/home/jwakely/src/gcc/libstdc++-v3/libsupc++ -std=gnu++11 -D_GLIBCXX_SHARED
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=cxx11-shim_facets.lo -g -O2 -D_GNU_SOURCE -m32 -c
cxx11-shim_facets.ii  -fPIC -DPIC -D_GLIBCXX_SHARED -o cxx11-shim_facets.o



/home/jwakely/src/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc: In member
function ‘std::__facet_shims::{anonymous}::money_put_shim<_CharT>::iter_type
std::__facet_shims::{anonymous}::money_put_shim<_CharT>::do_put(std::__facet_shims::{anonymous}::money_put_shim<_CharT>::iter_type,
bool, std::ios_base&,
std::__facet_shims::{anonymous}::money_put_shim<_CharT>::char_type, const
string_type&) const [with _CharT = wchar_t;
std::__facet_shims::{anonymous}::money_put_shim<_CharT>::iter_type =
std::ostreambuf_iterator >;
std::__facet_shims::{anonymous}::money_put_shim<_CharT>::char_type = wchar_t;
std::__facet_shims::{anonymous}::money_put_shim<_CharT>::string_type =
std::basic_string]’:
/home/jwakely/src/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:427:2:
internal compiler error: in expand_expr_addr_expr_1, at expr.c:7716
  do_put(iter_type s, bool intl, ios_base& io,
  ^
0x109011df expand_expr_addr_expr_1
/home/jwakely/src/gcc/gcc/expr.c:7716
0x10901bfb expand_expr_addr_expr
/home/jwakely/src/gcc/gcc/expr.c:7830
0x10910897 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/jwakely/src/gcc/gcc/expr.c:10704
0x109021ef expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/jwakely/src/gcc/gcc/expr.c:7998
0x106fff7f expand_normal
/home/jwakely/src/gcc/gcc/expr.h:305
0x107020c7 precompute_register_parameters
/home/jwakely/src/gcc/gcc/calls.c:869
0x1070a78f expand_call(tree_node*, rtx_def*, int)
/home/jwakely/src/gcc/gcc/calls.c:3119
0x1090f537 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/jwakely/src/gcc/gcc/expr.c:10472
0x109021ef expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/jwakely/src/gcc/gcc/expr.c:7998
0x10719cbf expand_expr
/home/jwakely/src/gcc/gcc/expr.h:299
0x10727cc3 expand_call_stmt
/home/jwakely/src/gcc/gcc/cfgexpand.c:2347
0x1072befb expand_gimple_stmt_1
/home/jwakely/src/gcc/gcc/cfgexpand.c:3293
0x1072c743 expand_gimple_stmt
/home/jwakely/src/gcc/gcc/cfgexpand.c:3447
0x10734d27 expand_gimple_basic_block
/home/jwakely/src/gcc/gcc/cfgexpand.c:5280
0x10737197 execute
/home/jwakely/src/gcc/gcc/cfgexpand.c:5889

[Bug target/64074] PowerPC E500: Passing of double parameters not EABI compliant

2014-11-25 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64074

--- Comment #1 from joseph at codesourcery dot com  ---
Yes, you need -mabi=spe for this to work.  Any form of e500 operation 
without -mabi=spe (except maybe e500v1 single-precision-only non-vector 
floating point) will not follow any well-defined ABI.

r187581 (2012-05-16, so 4.8 and later) made -mcpu= for e500 processors 
enable -mabi=spe by default.


[Bug lto/64076] [4.9/5 Regression] ICE: in update_visibility_by_resolution_info, at ipa-visibility.c:427

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64076

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-25
 CC||hubicka at ucw dot cz
   Target Milestone|--- |4.9.3
Summary|ICE: in |[4.9/5 Regression] ICE: in
   |update_visibility_by_resolu |update_visibility_by_resolu
   |tion_info, at   |tion_info, at
   |ipa-visibility.c:427|ipa-visibility.c:427
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
It was caused by r202111.


[Bug c/59332] Segmentation fault in inline_summary with LTO + attribute optimize

2014-11-25 Thread d.g.gorbachev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332

--- Comment #7 from Dmitry Gorbachev  ---
Recent GCC 5 accepts both "lto" and "no-lto". However, they work on a per-file
rather then on a per-function basis...


[Bug c++/64077] New: dynamic_cast incorrectly rejected for private base

2014-11-25 Thread gcc at dixie dot net.nz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64077

Bug ID: 64077
   Summary: dynamic_cast incorrectly rejected for private base
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gcc at dixie dot net.nz

I believe this is rejects-valid:

class Base { public: virtual ~Base () {} };
class Derived: virtual Base { public: virtual ~Derived() {} };
class D2: virtual public Base, public Derived { public: D2() {} ~D2() {} };

#include 
int main ()
{
Derived *p = new D2;
assert(dynamic_cast(p)); // unexpected error: ‘Base’ is an
inaccessible base of ‘Derived’
}


The following lookup_base call should not issue errors.  Also it should do
access checks at global scope, not using friendship or access rights granted by
the local scope.

--- orig/gcc/cp/rtti.c 2014-06-13 08:47:08.0 +1200
+++ new/gcc/cp/rtti.c   2014-11-25 19:13:06.656252034 +1300
@@ -626,8 +626,8 @@ build_dynamic_cast_1 (tree type, tree ex
  convert statically.  */
   {
 tree binfo = lookup_base (TREE_TYPE (exprtype), TREE_TYPE (type),
- ba_check, NULL, complain);
-if (binfo)
+ ba_check | ba_ignore_scope, NULL, 0);
+if (binfo && binfo != error_mark_node)
   return build_static_cast (type, expr, complain);
   }

[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075

H.J. Lu  changed:

   What|Removed |Added

 CC||enkovich.gnu at gmail dot com

--- Comment #3 from H.J. Lu  ---
It was caused by r217655.


[Bug lto/60150] [4.9 Regression] ICE in function_and_variable_visibility, at ipa.c:1000

2014-11-25 Thread d.g.gorbachev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60150

--- Comment #6 from Dmitry Gorbachev  ---
Filed bug 64076 for a new problem.


[Bug lto/64076] New: ICE: in update_visibility_by_resolution_info, at ipa-visibility.c:427

2014-11-25 Thread d.g.gorbachev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64076

Bug ID: 64076
   Summary: ICE: in update_visibility_by_resolution_info, at
ipa-visibility.c:427
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: d.g.gorbachev at gmail dot com

Testcase in attachment 32108 (from bug 60150).

GCC 5.0.0 20141123 (experimental).

lto1: internal compiler error: in update_visibility_by_resolution_info, at
ipa-visibility.c:427
0x8c6bd6e update_visibility_by_resolution_info
../../gcc-5/gcc/ipa-visibility.c:423
0x8c6c7ac function_and_variable_visibility
../../gcc-5/gcc/ipa-visibility.c:582
0x8c6db2c whole_program_function_and_variable_visibility
../../gcc-5/gcc/ipa-visibility.c:773
0x8c6db2c execute
../../gcc-5/gcc/ipa-visibility.c:821
Please submit a full bug report,
with preprocessed source if appropriate.

Appeared in rev. (210315, 210592].


[Bug c++/63849] [4.9/5.0 Regression][c++11] ICE on variadic alias template with wrappers

2014-11-25 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63849

Jason Merrill  changed:

   What|Removed |Added

 CC||eric.niebler at gmail dot com

--- Comment #4 from Jason Merrill  ---
*** Bug 63730 has been marked as a duplicate of this bug. ***


[Bug c++/63730] C++11 ICE REGRESSION mangling template alias into function template

2014-11-25 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63730

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #2 from Jason Merrill  ---
This is the same issue as 63849, which I've fixed for 4.9.3/5.0.  But a much
smaller testcase.

*** This bug has been marked as a duplicate of bug 63849 ***


[Bug other/64046] Malformed .eh_frame generated with LTO, gold and optimization enabled

2014-11-25 Thread ccoutant at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64046

--- Comment #4 from Cary Coutant  ---
(Sorry, that's binutils PR gold/17639.)


[Bug other/64046] Malformed .eh_frame generated with LTO, gold and optimization enabled

2014-11-25 Thread ccoutant at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64046

Cary Coutant  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||ccoutant at gcc dot gnu.org
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |ccoutant at gcc dot 
gnu.org

--- Comment #3 from Cary Coutant  ---
See PR gold/17639. Fixed on binutils trunk.


[Bug target/63773] [meta-bug] Restoring darwin bootstrap for gcc 5.0

2014-11-25 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63773
Bug 63773 depends on bug 63703, which changed state.

Bug 63703 Summary: [4.9.2/5 Regression] Bootstrap broken on 
powerpc-apple-darwin, cc1: internal compiler error: in init_reg_sets
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703

   What|Removed |Added

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


[Bug bootstrap/63703] [4.9.2/5 Regression] Bootstrap broken on powerpc-apple-darwin, cc1: internal compiler error: in init_reg_sets

2014-11-25 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703

Francois-Xavier Coudert  changed:

   What|Removed |Added

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

--- Comment #18 from Francois-Xavier Coudert  ---
Fix committed to trunk and 4.9 branch, closing as fixed.


[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075

H.J. Lu  changed:

   What|Removed |Added

 Target|i686-pc-linux-gnu   |
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-25
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #2 from H.J. Lu  ---
It also happens on Linux/x86-64 with just -flto.


[Bug lto/61557] [4.9/5 Regression] LTO ICE: verify_flow_info failed (error: control flow in the middle of basic block)

2014-11-25 Thread d.g.gorbachev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61557

Dmitry Gorbachev  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #3 from Dmitry Gorbachev  ---
Disappeared in trunk rev. [214076, 214409). Also works with current 4.9.


[Bug bootstrap/63703] [4.9.2/5 Regression] Bootstrap broken on powerpc-apple-darwin, cc1: internal compiler error: in init_reg_sets

2014-11-25 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703

--- Comment #17 from Francois-Xavier Coudert  ---
Author: fxcoudert
Date: Tue Nov 25 21:41:44 2014
New Revision: 218064

URL: https://gcc.gnu.org/viewcvs?rev=218064&root=gcc&view=rev
Log:
PR bootstrap/63703
* config/rs6000/darwin.h (REGISTER_NAMES): Update based on 32 newly
added GCC hard register numbers for SPE high registers.

Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/rs6000/darwin.h


[Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106

2014-11-25 Thread d.g.gorbachev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075

Dmitry Gorbachev  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code, lto
 Target||i686-pc-linux-gnu

--- Comment #1 from Dmitry Gorbachev  ---
This happens when compiling libgcc with -flto.


[Bug lto/64075] New: [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106

2014-11-25 Thread d.g.gorbachev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075

Bug ID: 64075
   Summary: [5 Regression] ICE: in bp_pack_value, at
data-streamer.h:106
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: d.g.gorbachev at gmail dot com

Created attachment 34119
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34119&action=edit
Testcase

GCC 5.0.0 20141123 (experimental).

bug.c:4:1: internal compiler error: in bp_pack_value, at data-streamer.h:106
 }
 ^
0x817a447 bp_pack_value
../../gcc-5/gcc/data-streamer.h:105
0x893c35a bp_pack_value
../../gcc-5/gcc/data-streamer.h:115
0x893e94e pack_ts_function_decl_value_fields
../../gcc-5/gcc/tree-streamer-out.c:303
0x893e94e streamer_pack_tree_bitfields(output_block*, bitpack_d*, tree_node*)
../../gcc-5/gcc/tree-streamer-out.c:443
0x86045b9 lto_write_tree_1
../../gcc-5/gcc/lto-streamer-out.c:370
0x860ea18 lto_write_tree
../../gcc-5/gcc/lto-streamer-out.c:404
0x860ea18 lto_output_tree_1
../../gcc-5/gcc/lto-streamer-out.c:447
0x860ea18 DFS::DFS_write_tree(output_block*, DFS::sccs*, tree_node*, bool,
bool, bool)
../../gcc-5/gcc/lto-streamer-out.c:1448
0x860f20e DFS::DFS(output_block*, tree_node*, bool, bool, bool)
../../gcc-5/gcc/lto-streamer-out.c:495
0x860fca2 lto_output_tree(output_block*, tree_node*, bool, bool)
../../gcc-5/gcc/lto-streamer-out.c:1552
0x8603c47 write_global_stream
../../gcc-5/gcc/lto-streamer-out.c:2339
0x8612480 lto_output_decl_state_streams
../../gcc-5/gcc/lto-streamer-out.c:2386
0x8612480 produce_asm_for_decls()
../../gcc-5/gcc/lto-streamer-out.c:2666
0x8668ab0 write_lto
../../gcc-5/gcc/passes.c:2391
0x866bdd9 ipa_write_summaries_1
../../gcc-5/gcc/passes.c:2451
0x866bdd9 ipa_write_summaries(bool)
../../gcc-5/gcc/passes.c:2511
0x834d703 ipa_passes
../../gcc-5/gcc/cgraphunit.c:2091
0x834d703 symbol_table::compile()
../../gcc-5/gcc/cgraphunit.c:2187
0x834f542 symbol_table::finalize_compilation_unit()
../../gcc-5/gcc/cgraphunit.c:2340
0x81e0feb c_write_global_declarations()
../../gcc-5/gcc/c/c-decl.c:10777
Please submit a full bug report,
with preprocessed source if appropriate.


libgcc


[Bug boehm-gc/64042] FAIL: boehm-gc.c/gctest.c -O2 execution test

2014-11-25 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64042

vries at gcc dot gnu.org changed:

   What|Removed |Added

Version|unknown |5.0

--- Comment #4 from vries at gcc dot gnu.org ---
Reproduced with clean trunk bootstrap build, happened again 3 times in 1000
iterations:
...
Segfault at 0x7f0ef467b000
Unexpected bus error or segmentation fault
Segfault at 0x7fbb47d1f000
Unexpected bus error or segmentation fault
Segfault at 0x7ff71ee51000
Unexpected bus error or segmentation fault
...

Marking version 5.0


[Bug target/63534] [5 Regression] Bootstrap failure on x86_64/i686-linux

2014-11-25 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63534

--- Comment #72 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Tue Nov 25 21:07:43 2014
New Revision: 218062

URL: https://gcc.gnu.org/viewcvs?rev=218062&root=gcc&view=rev
Log:
Add a testcase for PR target/63534

PR target/63534
* gcc.target/i386/pr63534.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr63534.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/63527] [5 Regression] -fPIC uses 2 registers for GOT

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63527

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #6 from H.J. Lu  ---
Fixed.


[Bug target/63527] [5 Regression] -fPIC uses 2 registers for GOT

2014-11-25 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63527

--- Comment #5 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Tue Nov 25 20:54:16 2014
New Revision: 218061

URL: https://gcc.gnu.org/viewcvs?rev=218061&root=gcc&view=rev
Log:
Add a test for PR target/63527

PR target/63527
* gcc.target/i386/pr63527.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr63527.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/64074] New: PowerPC E500: Passing of double parameters not EABI compliant

2014-11-25 Thread florian.miedniak at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64074

Bug ID: 64074
   Summary: PowerPC E500: Passing of double parameters not EABI
compliant
   Product: gcc
   Version: 4.7.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: florian.miedniak at web dot de

Created attachment 34118
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34118&action=edit
minimal testcase, preprocessed

For target PowerPC E500, GCC 4.7.3/4.8.2 fails to pass 64-bit parameters
(double) according to PowerPC EABI (lower and higher 32-bit parts in two GPRs).
Instead it emits a vector load opcode (evldd) and uses whole 64-bits of one GPR
to pass the double parameter (See attached minimal example).

void main(void)
{
double a = 5.0;

foo(a);
}

compiled with:

powerpc-elf-eabi-gcc.exe -mcpu=8540 -c test.c -o test.o -mdouble-float
-mfloat-gprs=double

produces:

004c :
  4c:94 21 ff e0 stwur1,-32(r1)
  50:7c 08 02 a6 mflrr0
  54:90 01 00 24 stw r0,36(r1)
  58:93 e1 00 1c stw r31,28(r1)
  5c:7c 3f 0b 78 mr  r31,r1
  60:48 00 00 01 bl  60 
  64:3d 20 00 00 lis r9,0
  68:39 29 00 00 addir9,r9,0
  6c:11 29 03 01 evldd   r9,0(r9)
  70:11 3f 0b 21 evstdd  r9,8(r31)
  74:10 7f 0b 01 evldd   r3,8(r31) <-
  78:48 00 00 01 bl  78 
  7c:39 7f 00 20 addir11,r31,32
  80:80 0b 00 04 lwz r0,4(r11)
  84:7c 08 03 a6 mtlrr0
  88:83 eb ff fc lwz r31,-4(r11)
  8c:7d 61 5b 78 mr  r1,r11
  90:4e 80 00 20 blr

  This is not a problem as long as the callee is compiled with (same) GCC, too.
Things break, if you want to link with e.g. a library that is compiled with
another compiler that expects double to be passed in two regs (here: r3/r4).

  I'm seeing this problem with:
   - GCC 4.7.3 configured with: ../../../src/gcc-4.7.3/configure
--prefix=/c/toolchain/install/powerpc-elf-eabi --enable-languages=c,c++
--build=i686-pc-mingw32 --host=i686-pc-mingw32 --target=powerpc-elf-eabi
--disable-nls --enable-debug --with-gcc --with-gnu-as --with-gnu-ld
--with-stabs --disable-multilib --disable-shared --disable-win32-registry
--without-headers --with-newlib --disable-wchar_t --disable-libstdcxx-pch
--verbose

c:/powerpc-elf-eabi/bin/../libexec/gcc/powerpc-elf-eabi/4.7.3/cc1.exe
-fpreprocessed test.i -quiet -dumpbase test.c -mcpu=8540 -mdouble-float
-mfloat-gprs=double -auxbase-strip test.o -version -o test.s
GNU C (GCC) version 4.7.3 (powerpc-elf-eabi)
compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
c://powerpc-elf-eabi/bin/../lib/gcc/powerpc-elf-eabi/4.7.3/../../../../powerpc-elf-eabi/bin/as.exe
-v -me500 -many -o test.o test.s
GNU assembler version 2.23.2 (powerpc-elf-eabi) using BFD version (GNU
Binutils) 2.23.2

-  GCC 4.8.2 configured with:
Configured with: ./configure
--prefix=/home/v/buildroot-2014.05/output/host/usr
--sysconfdir=/home/v/buildroot-2014.05/output/host/etc --enable-shared
--enable-static --target=powerpc-buildroot-linux-uclibcspe
--with-sysroot=/home/v/buildroot-2014.05/output/host/usr/powerpc-buildroot-linux-uclibcspe/sysroot
--disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
--with-gmp=/home/v/buildroot-2014.05/output/host/usr
--with-mpfr=/home/v/buildroot-2014.05/output/host/usr --disable-libquadmath
--disable-libsanitizer --enable-tls --disable-libmudflap --enable-threads
--with-mpc=/home/v/buildroot-2014.05/output/host/usr --disable-decimal-float
--with-tune=8548 --with-pkgversion='Buildroot 2014.05'
--with-bugurl=http://bugs.buildroot.net/ --enable-e500_double
--with-long-double-128 --enable-languages=c --disable-largefile
--with-build-time-tools=/home/v/buildroot-2014.05/output/host/usr/powerpc-buildroot-linux-uclibcspe/bin
--disable-libgomp

Searching the web and bugzilla, I found out that this topic (and e500 handling
in general) was addressed several times in the past. Though, it appeared to me,
that this should be working with GCC 4.7.x, shouldn't it?

I already had a look at GCC PowerPC sources and suspected that
rs6000_function_arg() and rs6000_spe_function_arg() are responsible for the
PowerPC specific calling convention behaviour. But I didn't succeed yet in
tracking down where exactly the (wrong?) decision to use one single 64-bit GPR
instead of two is made.

I found this code snippet in rs6000_function_arg() very promising:

else if (TARGET_SPE_ABI && TARGET_SPE
   && (SPE_VECTOR_MODE (mode)
   || (TARGET_E500_DOUBLE && (mode == DFmode
  || mode == DCmode
  || mode == TFmode
  || mode == TCmode)))
return rs

[Bug target/63527] [5 Regression] -fPIC uses 2 registers for GOT

2014-11-25 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63527

--- Comment #4 from Vladimir Makarov  ---
Author: vmakarov
Date: Tue Nov 25 20:20:10 2014
New Revision: 218059

URL: https://gcc.gnu.org/viewcvs?rev=218059&root=gcc&view=rev
Log:
2014-11-25  Vladimir Makarov  

PR target/63527
* ira-lives.c (process_bb_node_lives): Check and remove conflict
of pic pseudo with pic hard reg.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ira-lives.c


[Bug jit/64020] jit misses sin/cos optimizations

2014-11-25 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64020

dmalcolm at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-11-25
 Ever confirmed|0   |1

--- Comment #4 from dmalcolm at gcc dot gnu.org ---
Am testing a candidate patch for this


[Bug c++/64073] Explicit duplicate template instantiation not reported as error when using 'using'

2014-11-25 Thread eugene at hutorny dot in.ua
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64073

--- Comment #1 from Eugene  ---
Created attachment 34117
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34117&action=edit
Code sample illustrating the problem


[Bug c++/64073] New: Explicit duplicate template instantiation not reported as error when using 'using'

2014-11-25 Thread eugene at hutorny dot in.ua
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64073

Bug ID: 64073
   Summary: Explicit duplicate template instantiation not reported
as error when using 'using'
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eugene at hutorny dot in.ua

When derived template classes introduces a base member with using, such methods
can be explicitly instantiated more than once with the same set of parameters.
Please refer to attached sample


[Bug tree-optimization/63593] ICE: verify_gimple failed: incompatible types in PHI argument 0 with -O3 -fno-tree-vectorize

2014-11-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63593

--- Comment #3 from Marek Polacek  ---
So it seems like tree_transform_and_unroll_loop creates a wrong PHI:
_101 = PHI 
where the type of _101 and pretmp_103 is int, and ivtmp_47 is unsigned.  How
that ivtmp_47 gets there is a mystery to me, but it happens during
duplicate_block.


[Bug bootstrap/63703] [4.9.2/5 Regression] Bootstrap broken on powerpc-apple-darwin, cc1: internal compiler error: in init_reg_sets

2014-11-25 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703

--- Comment #16 from Francois-Xavier Coudert  ---
Author: fxcoudert
Date: Tue Nov 25 19:01:08 2014
New Revision: 218058

URL: https://gcc.gnu.org/viewcvs?rev=218058&root=gcc&view=rev
Log:
PR bootstrap/63703
* config/rs6000/darwin.h (REGISTER_NAMES): Update based on 32 newly
added GCC hard register numbers for SPE high registers.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/darwin.h


[Bug tree-optimization/64072] New: wrong cgraph node profile count

2014-11-25 Thread wmi at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64072

Bug ID: 64072
   Summary: wrong cgraph node profile count
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wmi at google dot com
CC: davidxl at gcc dot gnu.org, hubicka at gcc dot gnu.org

We have a program like this:

A() {// hot func
  ...
}

B() {
  A();// very hot
  if (i) {
A();  // very cold
  }
}

Both callsites of A will be inlined into B. In gcc func
save_inline_function_body in inline_transform stage, A's first clone
will be choosen and materialized. For our case, the clone
node choosen corresponds to the cold callsite of A.
cgraph_rebuild_references in tree_function_versioning will reset the
cgraph node count of the choosen clone to the entry bb count of func A
(A is hot). So the cgraph node count of the choosen clone becomes hot
while its inline edge count is still cold. It breaks the assumption
described here:
https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01366.html:
for inline node, bb->count == edge->count == edge->callee->count

For the patch committed in the thread above (it is listed below),
cg_edge->callee->count is used for profile update to its inline
instance, which leads to a hot BB in func B which is actually very
cold. The wrong profile information causes performance regression in
one of our internal benchmarks. Our internal workround is to change
cg_edge->callee->count to MIN(cg_edge->callee->count, cg_edge->count).

Index: gcc/tree-inline.c
===
--- gcc/tree-inline.c (revision 210535)
+++ gcc/tree-inline.c (working copy)
@@ -4355,7 +4355,7 @@ expand_call_inline (basic_block bb, gimple stmt, c
  function in any way before this point, as this CALL_EXPR may be
  a self-referential call; if we're calling ourselves, we need to
  duplicate our body before altering anything.  */
-  copy_body (id, bb->count,
+  copy_body (id, cg_edge->callee->count,
GCOV_COMPUTE_SCALE (cg_edge->frequency, CGRAPH_FREQ_BASE),
  bb, return_block, NULL);


[Bug target/64052] compilation error "local frame unavailable" appears for some optimization levels

2014-11-25 Thread eugene at hutorny dot in.ua
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64052

Eugene  changed:

   What|Removed |Added

Version|4.7.2   |4.8.1

--- Comment #2 from Eugene  ---
As per https://packages.debian.org/unstable/devel/
avr-gcc 4.8.1 is the most recent available for debian

This issue is reproducible on 4.8.1


[Bug rtl-optimization/64037] [4.8/4.9/5 Regression] Miscompilation with -Os and enum class : char parameter

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64037

H.J. Lu  changed:

   What|Removed |Added

Summary|Miscompilation with -Os and |[4.8/4.9/5 Regression]
   |enum class : char parameter |Miscompilation with -Os and
   ||enum class : char parameter

--- Comment #13 from H.J. Lu  ---
The bug was introduced by

https://gcc.gnu.org/ml/gcc-cvs/2007-09/msg00613.html

commit 5d93234932c3d8617ce92b77b7013ef6bede9508
Author: shinwell 
Date:   Thu Sep 20 11:01:18 2007 +

  gcc/
  * combine.c: Include cgraph.h.
  (setup_incoming_promotions): Rework to allow more aggressive
  elimination of sign extensions when all call sites of the
  current function are known to lie within the current unit.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128618
138bc75d-0d04-0410-961f-82ee72b054a4

Before this commit, combine.c has

  enum machine_mode mode = TYPE_MODE (TREE_TYPE (arg));
  int uns = TYPE_UNSIGNED (TREE_TYPE (arg));

  mode = promote_mode (TREE_TYPE (arg), mode, &uns, 1);
  if (mode == GET_MODE (reg) && mode != DECL_MODE (arg))
{
  rtx x;
  x = gen_rtx_CLOBBER (DECL_MODE (arg), const0_rtx);
  x = gen_rtx_fmt_e ((uns ? ZERO_EXTEND : SIGN_EXTEND), mode, x);
  record_value_for_reg (reg, first, x);
}

It matches function.c:

  /* This is not really promoting for a call.  However we need to be
 consistent with assign_parm_find_data_types and expand_expr_real_1.  */
  promoted_nominal_mode
= promote_mode (data->nominal_type, data->nominal_mode, &unsignedp, 1);

128618 changed

mode = promote_mode (TREE_TYPE (arg), mode, &uns, 1);

to

mode3 = promote_mode (DECL_ARG_TYPE (arg), mode2, &uns3, 1);

It breaks none WORD_REGISTER_OPERATIONS targets.


[Bug ipa/64070] FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-ipa-dump-times inline "First type is base of second" 3

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64070

H.J. Lu  changed:

   What|Removed |Added

 Resolution|FIXED   |DUPLICATE

--- Comment #3 from H.J. Lu  ---


*** This bug has been marked as a duplicate of bug 64060 ***


[Bug ipa/64060] [5 Regression] r218009 caused FAIL: g++.dg/ipa/devirt-42.C

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64060

H.J. Lu  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #3 from H.J. Lu  ---
*** Bug 64070 has been marked as a duplicate of this bug. ***


[Bug ipa/64070] FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-ipa-dump-times inline "First type is base of second" 3

2014-11-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64070

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.0

--- Comment #2 from H.J. Lu  ---
Dup.


[Bug rtl-optimization/64041] [4.9/5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-11-25 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64041

Martin Jambor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Martin Jambor  ---
(In reply to Richard Biener from comment #2)
> It looks similar to the signed/unsigned IPA CP issue.

Indeed, I have added this testcase to the patch.

*** This bug has been marked as a duplicate of bug 63551 ***


[Bug tree-optimization/63551] [4.9/5 Regression] wrong code (segfaults) at -Os on x86_64-linux-gnu

2014-11-25 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63551

--- Comment #7 from Martin Jambor  ---
*** Bug 64041 has been marked as a duplicate of this bug. ***


[Bug ipa/63851] [5 Regression] ipa-icf miscompiles gfortran.dg/assumed_rank_(8|9|10).f90 at -O2 and above

2014-11-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63851

--- Comment #2 from Martin Liška  ---
OK, I can reproduce the problem on x86_64 with following simple patch applied:

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 4875dec..c985052 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -606,6 +606,12 @@ sem_function::merge (sem_item *alias_item)
   create_thunk = true;
 }

+  if (create_alias )
+  {
+create_thunk = true;
+create_alias = false;
+  }
+


There's a pair of functions 'g' and 'h' that are proved by IPA ICF to be equal
and thunk is created (darwin does not have alias support).
Semantic equality hit:g->h
Assembler symbol names:g.3324->h.3321

where 'h' looks is created as tail-call:

h (struct array7_integer(kind=4) & restrict x)
{
  :
  g (x_2(D)); [tail call]
  return;

}

and MAIN__:
  :
  # kk_1 = PHI 
  *kk_1 = 489;
  desc.6.dtype = 264;
  desc.6.data = kk_1;
  h (&desc.6); [static-chain: &FRAME.15]
  desc.6 ={v} {CLOBBER};
  j.8_45 = FRAME.15.j;
  if (j.8_45 != 1)
goto ;
  else
goto ;


It looks fine, but after inlining is done, we are given:

assumed_rank_8.f90.063t.copyrename2:

MAIN__:
...
  :
  # kk_11 = PHI 
  *kk_11 = 489;
  desc.6.dtype = 264;
  desc.6.data = kk_11;
  g (&desc.6);
  desc.6 ={v} {CLOBBER};
  j.8_12 = FRAME.15.j;
  if (j.8_12 != 1)
goto ;
  else
goto ;

Is missing [static-chain: &FRAME.15] in 'g (&desc.6);' problematic in this
context?

Thanks,
Martin

[Bug fortran/64071] FAIL: gfortran.dg/dollar_sym_1.f90 -O (test for excess errors)

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64071

John David Anglin  changed:

   What|Removed |Added

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

--- Comment #2 from John David Anglin  ---
Bug was observed in r218022.


[Bug fortran/64071] FAIL: gfortran.dg/dollar_sym_1.f90 -O (test for excess errors)

2014-11-25 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64071

Tobias Burnus  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2014-11-25
 CC||burnus at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Tobias Burnus  ---
WAITING for confirmation:

Should be fixed since r218029.


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

Richard Biener  changed:

   What|Removed |Added

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

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


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

--- Comment #9 from Richard Biener  ---
Author: rguenth
Date: Tue Nov 25 16:43:24 2014
New Revision: 218049

URL: https://gcc.gnu.org/viewcvs?rev=218049&root=gcc&view=rev
Log:
2014-11-25  Richard Biener  

PR lto/64065
* lto-streamer-out.c (output_struct_function_base): Stream
last_clique field.
* lto-streamer-in.c (input_struct_function_base): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-in.c
trunk/gcc/lto-streamer-out.c


[Bug fortran/64071] New: FAIL: gfortran.dg/dollar_sym_1.f90 -O (test for excess errors)

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64071

Bug ID: 64071
   Summary: FAIL: gfortran.dg/dollar_sym_1.f90   -O  (test for
excess errors)
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
 Build: hppa64-hp-hpux11.11

Executing on host: /test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../gfortran
-B
/test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../
-B/test/gnu/gcc/objdir/hppa64
-hp-hpux11.11/./libgfortran/
/test/gnu/gcc/gcc/gcc/testsuite/gfortran.dg/dollar_
sym_1.f90  -fno-diagnostics-show-caret -fdiagnostics-color=never-O  
-pedant
ic-errors -S   -o dollar_sym_1.s(timeout = 300)
spawn /test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../gfortran
-B/test/gnu/gcc
/objdir/gcc/testsuite/gfortran/../../
-B/test/gnu/gcc/objdir/hppa64-hp-hpux11.11
/./libgfortran/ /test/gnu/gcc/gcc/gcc/testsuite/gfortran.dg/dollar_sym_1.f90
-fn
o-diagnostics-show-caret -fdiagnostics-color=never -O -pedantic-errors -S -o
dol
lar_sym_1.s
/test/gnu/gcc/gcc/gcc/testsuite/gfortran.dg/dollar_sym_1.f90:5:16: Fatal Error:
Invalid character '$' at (1). Use '-fdollar-ok' to allow it as an extension
compilation terminated.
compiler exited with status 1
output is:
/test/gnu/gcc/gcc/gcc/testsuite/gfortran.dg/dollar_sym_1.f90:5:16: Fatal Error:
Invalid character '$' at (1). Use '-fdollar-ok' to allow it as an extension
compilation terminated.

PASS: gfortran.dg/dollar_sym_1.f90   -O   (test for errors, line 5)
FAIL: gfortran.dg/dollar_sym_1.f90   -O  (test for excess errors)
Excess errors:
compilation terminated.

Similar fail:
FAIL: gfortran.dg/dollar_sym_3.f   -O  (test for excess errors)


[Bug libfortran/62250] FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib -O2 -lcaf_single

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62250

--- Comment #1 from John David Anglin  ---
The gfortran command does not explicitly link with libatomic.


[Bug tree-optimization/61634] [4.8/4.9/5 Regression] ICE in in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1423

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61634

--- Comment #6 from Richard Biener  ---
The issue seems that we fail to detect hybrid SLP here because
vect_detect_hybrid_slp_stmts walks immediate uses of SLP defs but those
do not reach pattern stmts but only original ones.  In this case we have

  _11 = *prephitmp_46;
  _12 = _11 >> 2;
  f_13 = (int) _12;
  *prephitmp_46 = _12;
  _17 = f_13 * f_13;

where the SLP def _12 is used in f_13 = (int) _12; but that stmt is marked
as vect_unused_in_scope because it feeds a stmt that was pattern detected
as widening multiplication.  But we never visit that stmt, as its
immediate uses are not accounted for (pattern stmts never get updated).

That makes the vect_detect_hybrid_slp_stmts functions non-functional
for non-trivial patterns.  We can "fix" this by marking the stmts
in some way and make sure to account for them in the loop.  For the
testcase forcing hybrid SLP by making !STMT_VINFO_RELEVANT stmts
force it fixes it.

I think that the best thing to do is to re-write hybrid SLP detection
in terms of walking all stmts in the loop, similar to
vect_mark_stmts_to_be_vectorized and mark pure SLP stmts as hybrid.
The flag then still has to be propagated to the SLP tree children of
such node.

I have a prototype but that still needs quite some TLC.


[Bug ipa/64070] FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-ipa-dump-times inline "First type is base of second" 3

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64070

--- Comment #1 from John David Anglin  ---
Created attachment 34113
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34113&action=edit
Tree dump


[Bug libstdc++/64054] 27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc FAILs

2014-11-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64054

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-25
 Ever confirmed|0   |1

--- Comment #9 from Jonathan Wakely  ---
Yes, that's better, thanks :)

Pre-approved if you want to do that, otherwise I'll get to it later this week.


[Bug libstdc++/64054] 27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc FAILs

2014-11-25 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64054

--- Comment #8 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #7 from Jonathan Wakely  ---
> Aha, of course.
>
> Maybe we should just add this to the test for now?
>
> // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64054
> // { dg-xfail-if "" { *-*-solaris* } { "*" } { "" } }
>
> If 40411 gets fixed it will start XPASSing and we can remove it.

I guess that the best course for now, with two nits fixed:

* Instead of listing the URL, just add PR libstdc++/64054 in the comment
  field of dg-xfail if.

* Omit the default args to dg-xfail-if.

Thanks.
Rainer


[Bug ipa/64070] New: FAIL: g++.dg/ipa/devirt-42.C -std=gnu++11 scan-ipa-dump-times inline "First type is base of second" 3

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64070

Bug ID: 64070
   Summary: FAIL: g++.dg/ipa/devirt-42.C  -std=gnu++11
scan-ipa-dump-times inline "First type is base of
second" 3
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
 Build: hppa64-hp-hpux11.11

spawn /test/gnu/gcc/objdir/gcc/testsuite/g++/../../xg++
-B/test/gnu/gcc/objdir/g
cc/testsuite/g++/../../ /test/gnu/gcc/gcc/gcc/testsuite/g++.dg/ipa/devirt-42.C
-
fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++
-I/test/gnu/gcc
/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11
-I/test/gnu
/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include
-I/test/gnu/gcc/gcc/libstdc
++-v3/libsupc++ -I/test/gnu/gcc/gcc/libstdc++-v3/include/backward
-I/test/gnu/gc
c/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=gnu++11 -O3
-fno-ipa-c
p -fdump-ipa-inline-details -fno-early-inlining -fdump-tree-optimized -S -o
devi
rt-42.s
PASS: g++.dg/ipa/devirt-42.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/ipa/devirt-42.C  -std=gnu++11  scan-ipa-dump-times inline "First
type is base of second" 3
PASS: g++.dg/ipa/devirt-42.C  -std=gnu++11  scan-ipa-dump-times inline
"Discovered a virtual call to a known target" 2
PASS: g++.dg/ipa/devirt-42.C  -std=gnu++11  scan-tree-dump-times optimized
"return 2" 3
PASS: g++.dg/ipa/devirt-42.C  -std=gnu++11  scan-tree-dump-not optimized
"OBJ_TYPE_REF"

Similar fail:
FAIL: g++.dg/ipa/devirt-42.C  -std=gnu++14  scan-ipa-dump-times inline "First
type is base of second" 3


[Bug libstdc++/64054] 27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc FAILs

2014-11-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64054

--- Comment #7 from Jonathan Wakely  ---
Aha, of course.

Maybe we should just add this to the test for now?

// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64054
// { dg-xfail-if "" { *-*-solaris* } { "*" } { "" } }

If 40411 gets fixed it will start XPASSing and we can remove it.


[Bug fortran/61420] [4.8/4.9/5 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile

2014-11-25 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61420

janus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||janus at gcc dot gnu.org

--- Comment #2 from janus at gcc dot gnu.org ---
Reduced test case:


module test
  implicit none

  type functions
  contains
procedure :: get_pf
  end type

contains

  function get_pf(f)
class (functions) :: f
procedure (real), pointer :: get_pf
  end function

end module


[Bug bootstrap/64050] [5 Regression] r218009 causes LTO/PGO bootstrap failure: ICE: in inline_small_functions, at ipa-inline.c:1709

2014-11-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64050

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #6 from Martin Liška  ---
Resolved.

[Bug bootstrap/63995] Bootstrap error with -mmpx -fcheck-pointer-bounds

2014-11-25 Thread enkovich.gnu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63995

--- Comment #7 from Ilya Enkovich  ---
In chkpopt pass calls to bndmk are moved down to uses to decrease register
pressure.  Debug info introduces new uses and therefore it affects a position
where bndmk calls appear.

-g0 case:

  : 
  r.field = -1;   
  __bound_tmp.1_13 = __builtin_ia32_bndmk (&r, 4);
  test2.chkp (&r, __bound_tmp.1_13);  

-g case:

  :
  # DEBUG c => &r
  __bound_tmp.1_13 = __builtin_ia32_bndmk (&r, 4);
  # DEBUG __chkp_bounds_of_c => NULL
  r.field = -1;
  test2.chkp (&r, __bound_tmp.1_13);

Will ignore debug statements when computing a new position for bounds
load/creation (BTW debug statement seems to be damaged by gsi_move_before
called for bndmk).  Testing following fix:

diff --git a/gcc/tree-chkp-opt.c b/gcc/tree-chkp-opt.c
index ff390d7..b8d5d0b 100644
--- a/gcc/tree-chkp-opt.c
+++ b/gcc/tree-chkp-opt.c
@@ -1175,7 +1175,9 @@ chkp_reduce_bounds_lifetime (void)

   FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, op)
{
- if (dom_bb &&
+ if (is_gimple_debug (use_stmt))
+   continue;
+ else if (dom_bb &&
  dominated_by_p (CDI_DOMINATORS,
  dom_bb, gimple_bb (use_stmt)))
{


[Bug fortran/58754] [4.8/4.9/5 Regression] with allocatable character arrays

2014-11-25 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58754

janus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||janus at gcc dot gnu.org

--- Comment #3 from janus at gcc dot gnu.org ---
*** Bug 64069 has been marked as a duplicate of this bug. ***


[Bug fortran/64069] [4.8/4.9/5 Regression] ICE on allocating character array with source

2014-11-25 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64069

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #1)
> It may be a duplicate.

Oh, right. Just found PR58754, which seems to be exactly the same.

*** This bug has been marked as a duplicate of bug 58754 ***


[Bug libstdc++/64054] 27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc FAILs

2014-11-25 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64054

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #5 from Jonathan Wakely  ---
> Thanks - so it looks as though the problem is in std::stod which is pretty
> simple, and can be reduced to:
[...]
> Maybe Solaris' strtod() doesn't support hex floats in C++ code, so it will
> print "stopped at 'x'"

It does indeed.  When I compile the test with Studio 12.4 cc -std=c99, I
get

272.00 0x1.1p+8

instead, which reminded me that gcc still doesn't link with
values-xpg6.o in C99 mode.  There was quite some controversy about this
in PR target/40411, and nothing has happened on this front for quite
some time.

It turns out that if I add values-xpg6.o to the link, gcc prints the
same output as cc.

Rainer


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

--- Comment #7 from Joost VandeVondele  
---
(In reply to rguent...@suse.de from comment #6)
> Does the restrict stuff make any performance difference?

Not noticeable for the particular benchmark I'm running overnight.


[Bug middle-end/50770] limits-fndefn.c times out on ARM; runs 22 x faster with -fno-var-tracking

2014-11-25 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50770

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #4 from John David Anglin  ---
With 5.0, there is a segmentation fault on hppa64-hp-hpux11.11:

spawn /test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/
-fno-diagnostics
-show-caret -fdiagnostics-color=never -O2 -flto -flto-partition=none -w -c -o
li
mits-fndefn.o
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/limits-fndef
n.c
^M
Pid 16274 received a SIGSEGV for stack rowth failure.^M
Possible causes: insufficient memory or swap space,^M
or stack size exceeded maxssiz. ^M
xgcc: internal compiler error: Segmentation fault (program cc1)

Stack size is 16384 kbytes.  This doesn't occur with 4.9.


[Bug go/63731] Fallback to netgo does not work

2014-11-25 Thread boger at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63731

--- Comment #19 from boger at us dot ibm.com ---
(In reply to Ian Lance Taylor from comment #18)
> The -a option to "go build" means to rebuild all packages rather than using
> the installed versions (see http://golang.org/cmd/go for documentation). 
> The "-tags netgo" option means to build with the build tag netgo (see the
> build constraints section in http://golang.org/pkg/go/build/).  So, yes, it
> rebuilds the packages for the current link only.  This is more reasonable
> with the gc compiler than with gccgo, since the gc compiler is so fast.
> 

Most of the examples in the documentation show that the built packages are put
into the same directories as the source.  I assume that for an official release
with a binary distribution, that is not the way it works.  That's how it would
have to work with gccgo.  In that case everyone must share the same copy of the
source but then if build options are used that would cause packages to be
rebuilt, they must go somewhere that is only used for the curent build.  And I
don't understand what 'go install' would mean in that case.  The 'go install'
command documentation has very little information on where built packages are
stored or if there are cases when 'go install' can't be used.

> I'm OK in principle with coming up with some other approach to direct the Go
> library to use the Go DNS lookup rather than calling getaddrinfo.  I don't
> think that can be the default.  I don't think we want a program to
> unpredictably sometimes use one and sometimes use the other.  I don't think
> an environment variable would work well, since Yohei presumably wants the
> statically linked binary to work this way by default.  Unfortunately all I
> can think of would be adding another function to the net package directing
> lookups to use pure DNS; this is unfortunate because the net package already
> has the most complex and confusing API of all the standard Go packages.

I think providing another function that called the pure GO resolver would be
best.  Then the GO programmer can decide how to handle it if the first call
failed.


[Bug tree-optimization/61743] [5 Regression] Complete unroll is not happened for loops with short upper bound

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61743

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug fortran/64069] [4.8/4.9/5 Regression] ICE on allocating character array with source

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64069

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |4.8.4


[Bug lto/60449] Merging function DECLs discards leaf attribute which causes cfg verifier to fail

2014-11-25 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60449

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #19 from Martin Jambor  ---
I believe this has been fixed.  Thanks a lot by the way.


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

--- Comment #6 from rguenther at suse dot de  ---
On Tue, 25 Nov 2014, Joost.VandeVondele at mat dot ethz.ch wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065
> 
> --- Comment #5 from Joost VandeVondele  ethz.ch> ---
> (In reply to Richard Biener from comment #4)
> > Created attachment 34111 [details]
> > patch
> > 
> > Can you try this?
> 
> Cool, fixed!

Great.  Does the restrict stuff make any performance difference?


[Bug libstdc++/64054] 27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc FAILs

2014-11-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64054

--- Comment #5 from Jonathan Wakely  ---
Thanks - so it looks as though the problem is in std::stod which is pretty
simple, and can be reduced to:

#include 
#include 
#include 

int main()
{
  double d;

  char* endptr;
  errno = 0;
  const char* str = "0x1.1p+8";
  const double tmp = strtod(str, &endptr);

  if (endptr == str) {
puts("no characters consumed");
return 1;
  }
  else if (errno == ERANGE) {
puts("ERANGE");
return 2;
  }
  else if (*endptr) {
printf("stopped at '%c'\n", *endptr);
return 3;
  }
  else
d = tmp;

 printf("%f %a\n", d, d);
}

Maybe Solaris' strtod() doesn't support hex floats in C++ code, so it will
print "stopped at 'x'"


[Bug fortran/64069] [4.8/4.9/5 Regression] ICE on allocating character array with source

2014-11-25 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64069

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-25
Summary|[4.8/4.9 Regression] ICE on |[4.8/4.9/5 Regression] ICE
   |allocating character array  |on allocating character
   |with source |array with source
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed on trunk (at least r216016 and above) also. It may be a duplicate.


[Bug ipa/64060] [5 Regression] r218009 caused FAIL: g++.dg/ipa/devirt-42.C

2014-11-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64060

--- Comment #2 from Martin Liška  ---
Author: marxin
Date: Tue Nov 25 15:16:27 2014
New Revision: 218048

URL: https://gcc.gnu.org/viewcvs?rev=218048&root=gcc&view=rev
Log:
2014-11-25  Martin Liska  

PR bootstrap/64050
PR ipa/64060
* sreal.c (sreal::operator+): Addition fixed.
(sreal::signedless_plus): Negative numbers are
handled correctly.
(sreal::operator-): Subtraction is fixed.
(sreal::signedless_minus): Negative numbers are
handled correctly.
* sreal.h (sreal::operator<): Equal negative numbers
are compared correctly.
(sreal::shift): New checking asserts are introduced.
Operation is fixed.
* gcc.dg/plugin/plugin.exp: New plugin.
* gcc.dg/plugin/sreal-test-1.c: New test.
* gcc.dg/plugin/sreal_plugin.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/plugin/sreal-test-1.c
trunk/gcc/testsuite/gcc.dg/plugin/sreal_plugin.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/sreal.c
trunk/gcc/sreal.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/plugin/plugin.exp

[Bug bootstrap/64050] [5 Regression] r218009 causes LTO/PGO bootstrap failure: ICE: in inline_small_functions, at ipa-inline.c:1709

2014-11-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64050

--- Comment #5 from Martin Liška  ---
Author: marxin
Date: Tue Nov 25 15:16:27 2014
New Revision: 218048

URL: https://gcc.gnu.org/viewcvs?rev=218048&root=gcc&view=rev
Log:
2014-11-25  Martin Liska  

PR bootstrap/64050
PR ipa/64060
* sreal.c (sreal::operator+): Addition fixed.
(sreal::signedless_plus): Negative numbers are
handled correctly.
(sreal::operator-): Subtraction is fixed.
(sreal::signedless_minus): Negative numbers are
handled correctly.
* sreal.h (sreal::operator<): Equal negative numbers
are compared correctly.
(sreal::shift): New checking asserts are introduced.
Operation is fixed.
* gcc.dg/plugin/plugin.exp: New plugin.
* gcc.dg/plugin/sreal-test-1.c: New test.
* gcc.dg/plugin/sreal_plugin.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/plugin/sreal-test-1.c
trunk/gcc/testsuite/gcc.dg/plugin/sreal_plugin.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/sreal.c
trunk/gcc/sreal.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/plugin/plugin.exp

[Bug bootstrap/63995] Bootstrap error with -mmpx -fcheck-pointer-bounds

2014-11-25 Thread enkovich.gnu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63995

--- Comment #6 from Ilya Enkovich  ---
For attached -g0 problem reproducer:

>gcc pr63995-2.c -c -O2 -mmpx -fcheck-pointer-bounds -g -o 1.o
>gcc pr63995-2.c -c -O2 -mmpx -fcheck-pointer-bounds -g0 -o 2.o
>objdump_pl -d 1.o >1.dump
>objdump_pl -d 2.o >2.dump
>diff 1.dump 2.dump
2c2
< 1.o: file format elf64-x86-64
---
> 2.o: file format elf64-x86-64
19,22c19,22
<   2b: b8 03 00 00 00  mov$0x3,%eax
<   30: f3 0f 1b 1c 07  bndmk  (%rdi,%rax,1),%bnd3
<   35: c7 44 24 10 ff ff ffmovl   $0x,0x10(%rsp)
<   3c: ff
---
>   2b: c7 44 24 10 ff ff ffmovl   $0x,0x10(%rsp)
>   32: ff
>   33: b8 03 00 00 00  mov$0x3,%eax
>   38: f3 0f 1b 1c 07  bndmk  (%rdi,%rax,1),%bnd3

Different instructions order is caused by different GIMPLE statements order
after chkpopt pass.  Will prepare a fix for that.


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

--- Comment #5 from Joost VandeVondele  
---
(In reply to Richard Biener from comment #4)
> Created attachment 34111 [details]
> patch
> 
> Can you try this?

Cool, fixed!


[Bug fortran/64069] New: [4.8/4.9 Regression] ICE on allocating character array with source

2014-11-25 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64069

Bug ID: 64069
   Summary: [4.8/4.9 Regression] ICE on allocating character array
with source
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: janus at gcc dot gnu.org

Consider the following example code:

character(len=12), allocatable :: yDesc(:)
allocate(yDesc(5), source="some_string")
print *,yDesc(1:5)
end

This ICEs with gfortran 4.7.4, 4.8.3 and 4.9.1, while it compiles and runs as
expected with 4.6.4. Haven't tried trunk.


[Bug bootstrap/63995] Bootstrap error with -mmpx -fcheck-pointer-bounds

2014-11-25 Thread enkovich.gnu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63995

--- Comment #5 from Ilya Enkovich  ---
Created attachment 34112
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34112&action=edit
-g0 problem reproducer


[Bug middle-end/61927] [4.9 Regression] Wrong results with loop vectorization of: "var[i] = ABS_EXPR > 9.9e-7"

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61927

Richard Biener  changed:

   What|Removed |Added

  Known to work||5.0
Summary|[4.9/5 Regression] Wrong|[4.9 Regression] Wrong
   |results with loop   |results with loop
   |vectorization of: "var[i] = |vectorization of: "var[i] =
   |ABS_EXPR  >|ABS_EXPR  >
   |9.9e-7" |9.9e-7"

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


[Bug middle-end/61927] [4.9/5 Regression] Wrong results with loop vectorization of: "var[i] = ABS_EXPR > 9.9e-7"

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61927

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Tue Nov 25 14:55:29 2014
New Revision: 218046

URL: https://gcc.gnu.org/viewcvs?rev=218046&root=gcc&view=rev
Log:
2014-11-25  Richard Biener  

PR tree-optimization/61927
* tree-vect-loop.c (vect_analyze_loop_2): Revert ordering
of group and pattern analysis to the one in GCC 4.8.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-loop.c


[Bug tree-optimization/62238] [4.9/5 Regression] ICE with LTO on valid code on x86_64-linux-gnu in verify_ssa (in 64-bit mode)

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62238

--- Comment #4 from Richard Biener  ---
This is a tree sharing issue, it reproduces with -O3 and a single concatenated
source as well.

Index: gcc/tree-predcom.c
===
--- gcc/tree-predcom.c  (revision 218019)
+++ gcc/tree-predcom.c  (working copy)
@@ -1402,8 +1402,8 @@ ref_at_iteration (data_reference_p dr, i
 off = size_binop (PLUS_EXPR, off,
  size_binop (MULT_EXPR, DR_STEP (dr), ssize_int (iter)));
   tree addr = fold_build_pointer_plus (DR_BASE_ADDRESS (dr), off);
-  addr = force_gimple_operand_1 (addr, stmts, is_gimple_mem_ref_addr,
-NULL_TREE);
+  addr = force_gimple_operand_1 (unshare_expr (addr), stmts,
+is_gimple_mem_ref_addr, NULL_TREE);
   tree alias_ptr = fold_convert (reference_alias_ptr_type (DR_REF (dr)),
coff);
   /* While data-ref analysis punts on bit offsets it still handles
  bitfield accesses at byte boundaries.  Cope with that.  Note that


[Bug middle-end/64067] ICE in expand_expr_real_1, at expr.c:10540, involving compound literal shenanigans

2014-11-25 Thread mpeg.blue at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64067

Mason  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Mason  ---
Might be related to Bug 57184


[Bug ipa/64068] [5 Regression] ICE: in remove_unreachable_nodes, at ipa.c:546

2014-11-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64068

--- Comment #1 from Martin Liška  ---
Introduced by r217973:

commit ca92a2511ecb05fb7c84df998723c257f23b6ca7
Author: hubicka 
Date:   Sat Nov 22 21:08:07 2014 +

* ipa.c (symbol_table::remove_unreachable_nodes): Mark all inline
clones
as having abstract origin used.
* ipa-inline-transform.c (can_remove_node_now_p_1): Drop abstract
origin check.
(clone_inlined_nodes): Copy abstract originflag.
* lto-cgraph.c (compute_ltrans_boundary): Use get_create to get
abstract origin node.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217973
138bc75d-0d04-0410-961f-82ee72b054a4

Martin

[Bug bootstrap/63853] [5.0 Regression] The use of strchrnul breaks bootstrap on x86_64-apple-darwin14.

2014-11-25 Thread tocarip.intel at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63853

tocarip.intel at gmail dot com changed:

   What|Removed |Added

 CC||tocarip.intel at gmail dot com

--- Comment #16 from tocarip.intel at gmail dot com ---
I've taken into account Jakub's input. Committed as r218044


[Bug middle-end/64067] ICE in expand_expr_real_1, at expr.c:10540, involving compound literal shenanigans

2014-11-25 Thread mpeg.blue at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64067

Mason  changed:

   What|Removed |Added

Summary|ICE involving compound  |ICE in expand_expr_real_1,
   |literal shenanigans |at expr.c:10540, involving
   ||compound literal
   ||shenanigans

--- Comment #3 from Mason  ---
The bit-field is a red-herring.
Simpler test case:

union foo { struct { int bar; } xx; int val; };
int * const adds[] = {&(((union foo){.xx={ 42 }}).val)};
int main(void) { return *(adds[0]); }


[Bug c++/63786] crash on argument pack in switch case

2014-11-25 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63786

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org

--- Comment #3 from Paolo Carlini  ---
Fixed.


[Bug c++/63786] crash on argument pack in switch case

2014-11-25 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63786

--- Comment #2 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Tue Nov 25 13:48:49 2014
New Revision: 218043

URL: https://gcc.gnu.org/viewcvs?rev=218043&root=gcc&view=rev
Log:
/cp
2014-11-25  Paolo Carlini  

PR c++/63786
* parser.c (cp_parser_label_for_labeled_statement): Check the case
with check_for_bare_parameter_packs.

/testsuite
2014-11-25  Paolo Carlini  

PR c++/63786
* g++.dg/cpp0x/variadic163.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic163.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

Richard Biener  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #4 from Richard Biener  ---
Created attachment 34111
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34111&action=edit
patch

Can you try this?


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

--- Comment #3 from rguenther at suse dot de  ---
On Tue, 25 Nov 2014, Joost.VandeVondele at mat dot ethz.ch wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065
> 
> Joost VandeVondele  changed:
> 
>What|Removed |Added
> 
>  CC||Joost.VandeVondele at mat 
> dot ethz
>||.ch
> 
> --- Comment #2 from Joost VandeVondele  ethz.ch> ---
> (In reply to Richard Biener from comment #1)
> > That would be nice.  Looking at the changes its either a latent issue
> > uncovered by inlining changes, my restrict change or my SCCVN change (which
> > might uncover a frontend bug - it did that for Java already).
> 
> r218005: Fail
> r218004: OK
> 
> Which makes it restrict changes, I guess.

:/

Might make it a bad interaction with the "special" support we have
for the Fortran frontend or a genuine bug.  Not sure without
something more self-contained.  But at least I'll think a bit more
about the LTO side of that change.  Ah!  A bug.


[Bug middle-end/64065] [5 Regression] CP2K miscompilation at -O3 -flto

2014-11-25 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

Joost VandeVondele  changed:

   What|Removed |Added

 CC||Joost.VandeVondele at mat dot 
ethz
   ||.ch

--- Comment #2 from Joost VandeVondele  
---
(In reply to Richard Biener from comment #1)
> That would be nice.  Looking at the changes its either a latent issue
> uncovered by inlining changes, my restrict change or my SCCVN change (which
> might uncover a frontend bug - it did that for Java already).

r218005: Fail
r218004: OK

Which makes it restrict changes, I guess.


[Bug bootstrap/63995] Bootstrap error with -mmpx -fcheck-pointer-bounds

2014-11-25 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63995

--- Comment #4 from rguenther at suse dot de  ---
On Tue, 25 Nov 2014, enkovich.gnu at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63995
> 
> --- Comment #3 from Ilya Enkovich  ---
> Patch removing duplicating bounds symbols is in review.  With this patch
> applied bootstrap goes till the end but there are lots of stage2 and stage3
> comparison error.  I looked into one of them and the difference is caused by
> '-gtoggle' option used for stage2 build and not used for stage3 build.

This means you are generating different code with -g vs. -g0 which is
forbidden.


[Bug bootstrap/63995] Bootstrap error with -mmpx -fcheck-pointer-bounds

2014-11-25 Thread enkovich.gnu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63995

--- Comment #3 from Ilya Enkovich  ---
Patch removing duplicating bounds symbols is in review.  With this patch
applied bootstrap goes till the end but there are lots of stage2 and stage3
comparison error.  I looked into one of them and the difference is caused by
'-gtoggle' option used for stage2 build and not used for stage3 build.


[Bug c++/61649] fixincludes update for solaris___restrict in sys/feature_tests.h on Illumos

2014-11-25 Thread richard at netbsd dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61649

--- Comment #4 from Richard PALO  ---


> 
> The test/base/sys/feature_tests.h patch is as follows:
> --- fixincludes/tests/base/sys/feature_tests.h.orig   2010-06-21
> 15:27:29.0 +
> +++ fixincludes/tests/base/sys/feature_tests.h
> @@ -10,6 +10,7 @@
>  
>  
>  #if defined( SOLARIS___RESTRICT_CHECK )
> +#if (defined(__STDC__) && defined(_STDC_C99))
>  #ifdef __cplusplus
>  #define  _RESTRICT_KYWD  __restrict
>  #else


Perhaps I should remind as well that the file is a diff with only a certain
number of lines as context... so in that respect, it isn't necessary either.

[Bug c++/61649] fixincludes update for solaris___restrict in sys/feature_tests.h on Illumos

2014-11-25 Thread richard at netbsd dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61649

--- Comment #3 from Richard PALO  ---
No. Prior to fixincludes, sys/feature_tests.h in SunOS looks like the
following:

#if (defined(__STDC__) && defined(_STDC_C99))
#define _RESTRICT_KYWD  restrict
#else
#define _RESTRICT_KYWD
#endif


Illumos has since https://www.illumos.org/issues/2941 the following:

#if (defined(__STDC__) && defined(_STDC_C99)) && !defined(__cplusplus)
#define _RESTRICT_KYWD  restrict
#else
#define _RESTRICT_KYWD
#endif


The net effect of my patch is to support both variants in producing the
following:

#if (defined(__STDC__) && defined(_STDC_C99))
#ifdef __cplusplus
#define _RESTRICT_KYWD __restrict
#else
#define _RESTRICT_KYWD  restrict
#endif
#else
#define _RESTRICT_KYWD
#endif


  1   2   >