[Bug c/63877] - -Wmissing-declarations produces false alarms for C99 inline functions

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

--- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org ---
Author: mpolacek
Date: Tue Nov 25 08:28:45 2014
New Revision: 218039

URL: https://gcc.gnu.org/viewcvs?rev=218039root=gccview=rev
Log:
PR c/63877
* c-decl.c (start_function): Disable -Wmissing-declarations warning
for inline functions.

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

Added:
trunk/gcc/testsuite/gcc.dg/pr63877.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/testsuite/ChangeLog


[Bug c/63877] - -Wmissing-declarations produces false alarms for C99 inline functions

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

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Marek Polacek mpolacek at gcc dot gnu.org ---
Fixed on trunk.


[Bug ipa/63970] [4.9 Regression] gcc-4_9 inlines less funcs than gcc-4_8 because of used_as_abstract_origin flag

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|WAITING |NEW
  Known to work||5.0
Summary|[4.9/5 Regression] gcc-4_9  |[4.9 Regression] gcc-4_9
   |inlines less funcs than |inlines less funcs than
   |gcc-4_8 because of  |gcc-4_8 because of
   |used_as_abstract_origin |used_as_abstract_origin
   |flag|flag


[Bug tree-optimization/64058] [5 Regression] Performance degradation after r216304

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
This sounds like a TER effect - the -fdump-rtl-expand-details dump should show
differences in SSA coalescing / TER replacements.

You are talking about

-(note 291 287 289 65 [bb 65] NOTE_INSN_BASIC_BLOCK)
-(jump_insn 289 291 290 65 (set (pc)
+(note 291 287 16 65 [bb 65] NOTE_INSN_BASIC_BLOCK)
+(insn 16 291 289 65 (set (reg:SI 85 [ l1_lsm.7 ])
+(reg:SI 113 [ u1_lsm.6 ])) /nfs/ims/home/izamyati/test_216304.c:72 -1
+ (nil))
+(jump_insn 289 16 290 65 (set (pc)
 (label_ref 288)) /nfs/ims/home/izamyati/test_216304.c:72 -1
  (nil)
  - 288)

which doesn't appear in the good dump - thus it looks like u1_lsm.6 and
l1_lsm.7 were coalesced there.

Btw, on trunk the testcase is now optimized to trap unconditionally with -flto
or -fwhole-program because the global vars are not initialized.

Can you check on the coalescing theory?


[Bug c++/15272] lookup, dependent base

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

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org

--- Comment #12 from Paolo Carlini paolo.carlini at oracle dot com ---
Nope, sorry, I told Jason a few days ago.


[Bug fortran/64066] New: [F2008] Wrongly accepts ; (semicolon) at ending a null token

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

Bug ID: 64066
   Summary: [F2008] Wrongly accepts ; (semicolon) at ending a null
token
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: accepts-invalid
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: burnus at gcc dot gnu.org

Fortran 2008 permits:
  I=1
  ;END

i.e. a continued line which starts with a ;.

gfortran wrongly also accepts a null statement terminated with a ';':

  ;END

That's a regression in gfortran 4.6, which adds this feature.

See also thread at
https://groups.google.com/forum/#!topic/comp.lang.fortran/hCuhaQv6JGc (Short
F2008 program) around 24 November; I believe it was also recently discussed at
the J3 mailing list, but their archive is currently down.


[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 rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2014-11-25
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
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).


[Bug target/64061] [5 Regression] ICE: in gen_rtx_SUBREG, at emit-rtl.c:894 with -O2 -g -fno-dce -fno-tree-dce

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug target/64056] [5 Regression] gcc.target/i386/chkp-strlen-4.c etc. FAIL

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

Ilya Enkovich enkovich.gnu at gmail dot com changed:

   What|Removed |Added

 CC||enkovich.gnu at gmail dot com

--- Comment #1 from Ilya Enkovich enkovich.gnu at gmail dot com ---
I sent a patch (https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03097.html) to
add checks for mempcpy availability.


[Bug ipa/64059] [5 Regression] ICE: Segmentation fault in ipa-polymorphic-call.c:1593

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0


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

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |5.0


[Bug c++/61402] [5 Regression][C++1y] Init-capture with side effect not working for some types

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

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-25
Summary|[C++1y] Init-capture with   |[5 Regression][C++1y]
   |side effect not working for |Init-capture with side
   |some types  |effect not working for some
   ||types
 Ever confirmed|0   |1

--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com ---
Thanks. Mainline currently crashes on both testcases. And of course it would be
nice to have a warning for this, like clang.


[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

Martin Liška marxin at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Martin Liška marxin at gcc dot gnu.org ---
Dup.

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

[Bug middle-end/64067] New: ICE involving compound literal shenanigans

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

Bug ID: 64067
   Summary: ICE involving compound literal shenanigans
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpeg.blue at free dot fr

$ gcc -v -save-temps -O2 test.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1'
--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.2 (Ubuntu 4.8.2-19ubuntu1) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O2' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1 -E -quiet -v -imultiarch
x86_64-linux-gnu test.c -mtune=generic -march=x86-64 -O2 -fpch-preprocess
-fstack-protector -Wformat -Wformat-security -o test.i
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/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' '-O2' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1 -fpreprocessed test.i -quiet -dumpbase
test.c -mtune=generic -march=x86-64 -auxbase test -O2 -version
-fstack-protector -Wformat -Wformat-security -o test.s
GNU C (Ubuntu 4.8.2-19ubuntu1) version 4.8.2 (x86_64-linux-gnu)
compiled by GNU C version 4.8.2, 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.2-19ubuntu1) version 4.8.2 (x86_64-linux-gnu)
compiled by GNU C version 4.8.2, 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: dc75e0628c9356affcec059d0c81cc01
test.c: In function ‘main’:
test.c:3:14: internal compiler error: in expand_expr_real_1, at expr.c:10540
 int main() { return *(adds[0]); }
  ^
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions.
Preprocessed source stored into /tmp/cczXWpwq.out file, please attach this to
your bugreport.


The test case is probably invalid C99 and C11.
What do the language lawyers say?

union foo { struct { unsigned baz: 3, bar: 1; } bits; int value; };
int * const adds[] = {(((union foo){.bits={ .bar = 0x1 }}).value)};
int main() { return *(adds[0]); }

[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 #3 from Martin Liška marxin at gcc dot gnu.org ---
*** Bug 64060 has been marked as a duplicate of this bug. ***

[Bug middle-end/64067] ICE involving compound literal shenanigans

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

--- Comment #1 from Mason mpeg.blue at free dot fr ---
Created attachment 34108
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34108action=edit
ICE diagnostic


[Bug middle-end/64067] ICE 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 mpeg.blue at free dot fr changed:

   What|Removed |Added

 CC||polacek at redhat dot com

--- Comment #2 from Mason mpeg.blue at free dot fr ---
Add Marek to CC list.


[Bug target/64056] [5 Regression] gcc.target/i386/chkp-strlen-4.c etc. FAIL

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

--- Comment #2 from ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Tue Nov 25 09:48:47 2014
New Revision: 218041

URL: https://gcc.gnu.org/viewcvs?rev=218041root=gccview=rev
Log:
PR target/64056
* gcc.target/i386/chkp-strlen-4.c: Add mempcpy target check.
* gcc.target/i386/chkp-stropt-4.c: Likewise.
* gcc.target/i386/chkp-stropt-8.c: Likewise.
* gcc.target/i386/chkp-stropt-12.c: Likewise.
* gcc.target/i386/chkp-stropt-16.c: Likewise.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c
trunk/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c
trunk/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c
trunk/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c
trunk/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c


[Bug ada/64057] possible issue in the shared implementation of Ada.Strings.Unbounded

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

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |NEW
Summary|Overlapping memcpy  |possible issue in the
   |generated for array |shared implementation of
   |assignment  |Ada.Strings.Unbounded

--- Comment #3 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
 I did try to isolate a testcase out of this, but wasn't successful. I
 would've provided one otherwise.

I see, probably somewhat hard to trigger.  Then this might be a bug in the
implementation of the shared version of Ada.Strings.Unbounded, which wouldn't
correctly detect some sharing.


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

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

Bug ID: 64068
   Summary: [5 Regression] ICE: in remove_unreachable_nodes, at
ipa.c:546
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: marxin at gcc dot gnu.org

Created attachment 34109
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34109action=edit
Somewhat reduced testcase

Running the Boost testsuite shows:

 % g++ -c -O2 -std=c++11 -w rule4.ii
rule4.ii:1265:15: internal compiler error: in remove_unreachable_nodes, at
ipa.c:546
   }
   ^
0xaf1cbb symbol_table::remove_unreachable_nodes(bool, _IO_FILE*)
../../gcc/gcc/ipa.c:546
0x1272dbc ipa_inline
../../gcc/gcc/ipa-inline.c:2193
0x1272dbc execute
../../gcc/gcc/ipa-inline.c:2558
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.

Adding -fno-ipa-icf fixes the issue.


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

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |5.0


[Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE

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

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
On trunk I get

vector.c:6:1: error: unrecognizable insn:
(insn 3 2 4 2 (set (reg/v:TI 101 [ a ])
(mem/c:TI (plus:SI (reg/f:SI 81 virtual-incoming-args)
(const_int 16 [0x10])) [1 a+0 S16 A128])) vector.c:4 -1
 (expr_list:REG_EQUIV (mem/c:TI (plus:SI (reg/f:SI 81
virtual-incoming-args)
(const_int 16 [0x10])) [1 a+0 S16 A128])
(nil)))

instead.

Reduced testcase for the convert_move ICE on the branches, ICEs at -m32
-march=i386:

#pragma GCC push_options
#pragma GCC target(sse)   
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); 
typedef long long __m128i __attribute__ ((__vector_size__ (16),
__may_alias__));
__m128i _mm_castps_si128(__m128 __A) { }
#pragma GCC pop_options 
__attribute__((vector_size(16))) int   
f(__attribute__((vector_size(16))) int a, 
__attribute__((vector_size(16))) int b)   
{   
  return a + b; 
}

this seems to be fixed on trunk.

Reduced testcase for the ICE on trunk, ICEs at -m32 -march=i386:

#pragma GCC push_options
#pragma GCC target(sse)   
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); 
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__,
__artificial__)) _mm_undefined_ps (void) {  
  } 
#pragma GCC target(sse2)
#pragma GCC pop_options 
__attribute__((vector_size(16))) int f(__attribute__((vector_size(16))) int a,
__attribute__((vector_size(16))) int b) {   
   return a + b;
  }   

thus it requires a sse2 target attribute.

Would be interesting to know what fixed the convert_move ICE on trunk.


[Bug rtl-optimization/63375] [4.8/4.9/5 Regression] reordering of reads across fences

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

--- Comment #17 from Mikael Pettersson mikpelinux at gmail dot com ---
(In reply to Pranith Kumar from comment #16)
 printf(%d\n, *(int *)(val1+4));

This is broken, you're invoking undefined behaviour.


[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 #4 from Martin Liška marxin at gcc dot gnu.org ---
Created attachment 34110
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34110action=edit
Suggested patch v1

[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 paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
   Target Milestone|--- |5.0

--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com ---
Mine.


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

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

--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org ---
Hmm, we store

  MEM[(logical(kind=4) *)_227] = vect_patt_319.44_273;
...
  MEM[(logical(kind=4) *)_227 + 4B] = vect_patt_318.52_169;
...
  MEM[(logical(kind=4) *)_227 + 8B] = vect_patt_304.60_132;
...

the result vectors 4 bytes apart but the vectors are 16byte V4SI ones.

So we unroll the inner two loops and get

  for (i = 1; i = 8; ++i)
{
  symm_nonzero[i][0][0] = ABS ...  ...;
  ... repeated 9 times with other constant 2nd/3rd index ...
}

which we vectorize to a loop with two iterations but still 9 vector stores
to symm_nonzero.  This doesn't make much sense...  it looks like SLP
failed half-way.  Or rather the vectorizer is somehow confused by
the bool pattern detected:

t.f90:42:0: note: pattern recognized: VIEW_CONVERT_EXPRunsigned
int(symm_nonzero[_200]) = patt_319;

with the VIEW_CONVERT_EXPR on the LHS which is not seen as grouped store.

So it looks like vect_recog_bool_pattern does not handle grouped stores
properly and

Index: tree-vect-patterns.c
===
--- tree-vect-patterns.c(revision 218019)
+++ tree-vect-patterns.c(working copy)
@@ -3261,6 +3261,8 @@ vect_recog_bool_pattern (vecgimple *st
   gcc_assert (vectype != NULL_TREE);
   if (!VECTOR_MODE_P (TYPE_MODE (vectype)))
return NULL;
+  if (STMT_VINFO_GROUP_FIRST_ELEMENT (stmt_vinfo))
+   return NULL;
   if (!check_bool_pattern (var, loop_vinfo, bb_vinfo))
return NULL;

fixes this testcase (and then does not vectorize this loop).

Any takers making this testcase suitable for the testsuite?  It should
abort() for bogus results and return normally for success.  It should
not output to the terminal.


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

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

--- Comment #7 from Richard Biener rguenth at gcc dot gnu.org ---
A different possible fix is to re-order pattern recog back to before
analyzing data ref accesses.  Vectorization then fails during SLP analysis.

I'm going to test both patches.


[Bug preprocessor/60436] [4.8/4.9/5 Regression] C preprocessor segfaults on assembly file

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

--- Comment #10 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Tue Nov 25 11:16:27 2014
New Revision: 218042

URL: https://gcc.gnu.org/viewcvs?rev=218042root=gccview=rev
Log:
PR preprocessor/60436
* line-map.c (linemap_line_start): If highest is above 0x6000
and we are still tracking columns or highest is above 0x7000,
force add_map.

Modified:
trunk/libcpp/ChangeLog
trunk/libcpp/line-map.c


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

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

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 CC||korbb at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org ---
(In reply to Richard PALO from comment #0)
 
 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

Shouldn't there be a corresponding #endif added to that file?

[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 #4 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE ---
 --- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org ---
 Doh, so it is, I misread the test code.

 Rainer, what does this print (when compiled with -std=c++11)?

 #include string
 #include stdio.h

 int main()
 {
   auto d = std::stod(0x1.1p+8);
   printf(%f %a\n, d, d);
 }

I get

0.00 0x0.0p+0

Rainer


[Bug ada/64055] [5 regression] gnat.dg/derived_aggregate.adb FAILs on 32-bit i386

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

--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE ---
 --- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr ---
 Revision r217101 is OK.

Not in my case: at r217915, the test FAILs for the 32-bit multilib of
both the i386-apple-darwin14.0.0 and x86_64-apple-darwin14.0.0
configurations.  Same for i686-unknown-linux-gnu and
x86_64-unknown-linux-gnu and i386-pc-solaris2.1[01] and
amd64-pc-solaris2.1[01].

Also (only checked i386-pc-solaris2.11) at r216981 and r217189.

Rainer


[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 richard at netbsd dot org ---
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


[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 richard at netbsd dot org ---


 
 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 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 enkovich.gnu at gmail dot com ---
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 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 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 enkovich.gnu at gmail dot com ---
 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 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 Joost.VandeVondele at mat dot ethz.ch changed:

   What|Removed |Added

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

--- Comment #2 from Joost VandeVondele Joost.VandeVondele at mat dot 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.


[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 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 Joost.VandeVondele at mat dot ethz.ch changed:
 
What|Removed |Added
 
  CC||Joost.VandeVondele at mat 
 dot ethz
||.ch
 
 --- Comment #2 from Joost VandeVondele Joost.VandeVondele at mat dot 
 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 rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64065

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

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

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

Can you try this?


[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 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=218043root=gccview=rev
Log:
/cp
2014-11-25  Paolo Carlini  paolo.carl...@oracle.com

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  paolo.carl...@oracle.com

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 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 paolo.carlini at oracle dot com 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 paolo.carlini at oracle dot com ---
Fixed.


[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 mpeg.blue at free dot fr 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 mpeg.blue at free dot fr ---
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 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 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 marxin at gcc dot gnu.org ---
Introduced by r217973:

commit ca92a2511ecb05fb7c84df998723c257f23b6ca7
Author: hubicka hubicka@138bc75d-0d04-0410-961f-82ee72b054a4
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 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 mpeg.blue at free dot fr changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Mason mpeg.blue at free dot fr ---
Might be related to Bug 57184


[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 rguenth at gcc dot gnu.org ---
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/61927] [4.9/5 Regression] Wrong results with loop vectorization of: var[i] = ABS_EXPRvar2[i] 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 rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Tue Nov 25 14:55:29 2014
New Revision: 218046

URL: https://gcc.gnu.org/viewcvs?rev=218046root=gccview=rev
Log:
2014-11-25  Richard Biener  rguent...@suse.de

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 middle-end/61927] [4.9 Regression] Wrong results with loop vectorization of: var[i] = ABS_EXPRvar2[i] 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 rguenth at gcc dot gnu.org 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_EXPRvar2[i]  |ABS_EXPRvar2[i]  
   |9.9e-7 |9.9e-7

--- Comment #9 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed on trunk sofar.


[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 enkovich.gnu at gmail dot com ---
Created attachment 34112
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34112action=edit
-g0 problem reproducer


[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 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 Joost.VandeVondele at mat dot ethz.ch 
---
(In reply to Richard Biener from comment #4)
 Created attachment 34111 [details]
 patch
 
 Can you try this?

Cool, fixed!


[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 marxin at gcc dot gnu.org ---
Author: marxin
Date: Tue Nov 25 15:16:27 2014
New Revision: 218048

URL: https://gcc.gnu.org/viewcvs?rev=218048root=gccview=rev
Log:
2014-11-25  Martin Liska  mli...@suse.cz

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 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 marxin at gcc dot gnu.org ---
Author: marxin
Date: Tue Nov 25 15:16:27 2014
New Revision: 218048

URL: https://gcc.gnu.org/viewcvs?rev=218048root=gccview=rev
Log:
2014-11-25  Martin Liska  mli...@suse.cz

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 enkovich.gnu at gmail dot com ---
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 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 dominiq at lps dot ens.fr 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 dominiq at lps dot ens.fr ---
Confirmed on trunk (at least r216016 and above) also. It may be a duplicate.


[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 redi at gcc dot gnu.org ---
Thanks - so it looks as though the problem is in std::stod which is pretty
simple, and can be reduced to:

#include errno.h
#include stdio.h
#include stdlib.h

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 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 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 Joost.VandeVondele at mat dot 
 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 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 jamborm at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #19 from Martin Jambor jamborm at gcc dot gnu.org ---
I believe this has been fixed.  Thanks a lot by the way.


[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 rguenth at gcc dot gnu.org changed:

   What|Removed |Added

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


[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 rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1


[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 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 danglin at gcc dot gnu.org changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #4 from John David Anglin danglin at gcc dot gnu.org ---
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 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 Joost.VandeVondele at mat dot ethz.ch 
---
(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 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 ro at CeBiTec dot 
Uni-Bielefeld.DE ---
 --- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org ---
 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 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 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 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 enkovich.gnu at gmail dot com ---
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:

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

-g case:

  bb 4:
  # 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 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 marxin at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from Martin Liška marxin at gcc dot gnu.org ---
Resolved.

[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 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 redi at gcc dot gnu.org ---
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 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 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 ro at CeBiTec dot 
Uni-Bielefeld.DE ---
 --- Comment #7 from Jonathan Wakely redi at gcc dot gnu.org ---
 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 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 redi at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #9 from Jonathan Wakely redi at gcc dot gnu.org ---
Yes, that's better, thanks :)

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


[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 danglin at gcc dot gnu.org ---
Created attachment 34113
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34113action=edit
Tree dump


[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 rguenth at gcc dot gnu.org ---
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 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 danglin at gcc dot gnu.org ---
The gfortran command does not explicitly link with libatomic.


[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 rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Tue Nov 25 16:43:24 2014
New Revision: 218049

URL: https://gcc.gnu.org/viewcvs?rev=218049root=gccview=rev
Log:
2014-11-25  Richard Biener  rguent...@suse.de

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 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 rguenth at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #8 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed.


[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 burnus at gcc dot gnu.org 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 burnus at gcc dot gnu.org ---
WAITING for confirmation:

Should be fixed since r218029.


[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 danglin at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #2 from John David Anglin danglin at gcc dot gnu.org ---
Bug was observed in r218022.


[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 marxin at gcc dot gnu.org ---
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)
{
  bb 2:
  g (x_2(D)); [tail call]
  return;

}

and MAIN__:
  bb 8:
  # kk_1 = PHI kk_36(6), kk_39(7)
  *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 bb 9;
  else
goto bb 10;


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

assumed_rank_8.f90.063t.copyrename2:

MAIN__:
...
  bb 24:
  # kk_11 = PHI kk_9(22), kk_10(23)
  *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 bb 25;
  else
goto bb 26;

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

Thanks,
Martin

[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 jamborm at gcc dot gnu.org ---
*** Bug 64041 has been marked as a duplicate of this bug. ***


[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 jamborm at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Martin Jambor jamborm at gcc dot gnu.org ---
(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 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 hjl.tools at gmail dot com changed:

   What|Removed |Added

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

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com ---
Dup.


[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 hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #3 from H.J. Lu hjl.tools at gmail dot com ---
*** 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 hjl.tools at gmail dot com changed:

   What|Removed |Added

 Resolution|FIXED   |DUPLICATE

--- Comment #3 from H.J. Lu hjl.tools at gmail dot com ---


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


[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 hjl.tools at gmail dot com 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 hjl.tools at gmail dot com ---
The bug was introduced by

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

commit 5d93234932c3d8617ce92b77b7013ef6bede9508
Author: shinwell shinwell@138bc75d-0d04-0410-961f-82ee72b054a4
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 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 eugene at hutorny dot in.ua changed:

   What|Removed |Added

Version|4.7.2   |4.8.1

--- Comment #2 from Eugene eugene at hutorny dot in.ua ---
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 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 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 fxcoudert at gcc dot gnu.org ---
Author: fxcoudert
Date: Tue Nov 25 19:01:08 2014
New Revision: 218058

URL: https://gcc.gnu.org/viewcvs?rev=218058root=gccview=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/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 mpolacek at gcc dot gnu.org ---
So it seems like tree_transform_and_unroll_loop creates a wrong PHI:
_101 = PHI pretmp_103(8), ivtmp_47(4)
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 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 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 eugene at hutorny dot in.ua ---
Created attachment 34117
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34117action=edit
Code sample illustrating the problem


[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 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 vmakarov at gcc dot gnu.org ---
Author: vmakarov
Date: Tue Nov 25 20:20:10 2014
New Revision: 218059

URL: https://gcc.gnu.org/viewcvs?rev=218059root=gccview=rev
Log:
2014-11-25  Vladimir Makarov  vmaka...@redhat.com

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 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=34118action=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 main:
  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 main+0x14
  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 main+0x2c
  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)))

[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 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=218061root=gccview=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/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 hjl.tools at gmail dot com changed:

   What|Removed |Added

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

--- Comment #6 from H.J. Lu hjl.tools at gmail dot com ---
Fixed.


[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 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=218062root=gccview=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 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


  1   2   >