[Bug c++/64948] Lambda reference capture initialization in template function creates segmentation fault

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64948

Paolo Carlini  changed:

   What|Removed |Added

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

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

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


[Bug c++/64085] ICE on C++14 lambda by-reference capture with an initializer

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64085

Paolo Carlini  changed:

   What|Removed |Added

 CC||my.pvt.emailaddress@googlem
   ||ail.com

--- Comment #5 from Paolo Carlini  ---
*** Bug 64948 has been marked as a duplicate of this bug. ***


[Bug middle-end/65233] [5 Regression] ICE (segfault) on arm-linux-gnueabihf and aarch64-linux-gnu

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65233

--- Comment #24 from Richard Biener  ---
Author: rguenth
Date: Thu Mar  5 08:37:40 2015
New Revision: 221203

URL: https://gcc.gnu.org/viewcvs?rev=221203&root=gcc&view=rev
Log:
2015-03-05  Richard Biener  

PR middle-end/65233
* ipa-polymorphic-call.c: Include tree-ssa-operands.h and
tree-into-ssa.h.
(walk_ssa_copies): Revert last chage.  Instead do not walk
SSA names registered for SSA update.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-polymorphic-call.c


[Bug c++/64834] Captured variable not available in unevaluated context in a lambda with auto argument

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64834

--- Comment #2 from Paolo Carlini  ---
Let's add the testcase and close the bug.


[Bug ipa/65270] [5 regression] ICF needs to match TYPE attributes on memory accesses

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #20 from Richard Biener  ---
Author: rguenth
Date: Thu Mar  5 08:43:13 2015
New Revision: 221204

URL: https://gcc.gnu.org/viewcvs?rev=221204&root=gcc&view=rev
Log:
2015-03-05  Richard Biener  

PR ipa/65270
* ipa-icf-gimple.c (func_checker::compare_memory_operand):
Compare dependence info.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-icf-gimple.c


[Bug c++/64834] Captured variable not available in unevaluated context in a lambda with auto argument

2015-03-05 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64834

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Thu Mar  5 08:48:22 2015
New Revision: 221205

URL: https://gcc.gnu.org/viewcvs?rev=221205&root=gcc&view=rev
Log:
2015-03-05  Paolo Carlini  

PR c++/64834
* g++.dg/cpp1y/lambda-generic-uneval1.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-uneval1.C
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/65321] ICE on valid code at -O2 and -O3 with -g enabled in decompose, at rtl.h:2007

2015-03-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65321

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-03-05
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed, started with r212352.


[Bug c++/64834] Captured variable not available in unevaluated context in a lambda with auto argument

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64834

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #4 from Paolo Carlini  ---
Done.


[Bug debug/65321] ICE on valid code at -O2 and -O3 with -g enabled in decompose, at rtl.h:2007

2015-03-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65321

Marek Polacek  changed:

   What|Removed |Added

   Priority|P3  |P1
  Component|target  |debug


[Bug c++/65322] New: Narrowing conversion

2015-03-05 Thread wolfgang.roe...@gi-de.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65322

Bug ID: 65322
   Summary: Narrowing conversion
   Product: gcc
   Version: 4.8.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wolfgang.roe...@gi-de.com

Hi,
I would like to post a bug report for the GNU C/C++ compiler 4.8.3.
We use the compiler to generate code for a PowerPC processor.
Invokation line for the GNU C++ compiler:

ccppc -c -x c++ -std=c++11 -Wall -Werror -g -mcpu=8540 -meabi
  -ftls-model=local-exec -msdata=sysv -fno-common -mspe -mabi=spe
  -mfloat-gprs=double -mbig -mmultiple -mno-string -misel -mstrict-align
  -fverbose-asm -fno-exceptions -fno-rtti -fgcse-sm -fno-section-anchors
  -ftemplate-backtrace-limit=20 -G 8 -O3
  -I
  -D
  X.CPP -oX.O


// file X.CPP

#include "atomic"

struct S
{
explicit S (bool b = true)
: m_counter{ b ? 1u : 0u }
{}

std::atomic m_counter;
};

S x;


The compiler rejects this programm with the following message:
x.CPP: In constructor 'S::S(bool)':
x.CPP:6:30: error: narrowing conversion of '(b ? 1u : 0u)' from 'unsigned int'
   to 'std::atomic::__integral_type
   {aka short unsigned int}' inside { } [-Werror=narrowing]
 : m_counter{ b ? 1u : 0u }


I think this is not standard conforming. See C++11 standard, 8.5.4/7:
"A narrowing conversion is an implicit conversion ... from an integer type or
unscoped enumeration type to an integer type that cannot represent all the
values of the original type, except where the source is a constant expression
and the actual value after conversion will fit into the target type and will
produce the original value when converted back to the original type."


Kind regards
W. Roehrl


[Bug ipa/65318] [5 Regression] wrong code at -Os and above on x86_64-linux-gnu

2015-03-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65318

Marek Polacek  changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug c++/64665] Overload resolution not working with std::initializer_list and bool

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64665

--- Comment #5 from Paolo Carlini  ---
Let's add a reduced testcase and close the bug.


[Bug tree-optimization/65310] vectorizer uses wrong alignment

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65310

--- Comment #2 from Richard Biener  ---
Author: rguenth
Date: Thu Mar  5 09:14:01 2015
New Revision: 221206

URL: https://gcc.gnu.org/viewcvs?rev=221206&root=gcc&view=rev
Log:
2015-03-05  Richard Biener  

PR tree-optimization/65310
* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
Properly preserve alignment of the base of the access.

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

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr65310.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-data-refs.c


[Bug tree-optimization/65310] vectorizer uses wrong alignment

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65310

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||5.0
 Resolution|--- |FIXED

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


[Bug c++/64665] Overload resolution not working with std::initializer_list and bool

2015-03-05 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64665

--- Comment #6 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Thu Mar  5 09:15:58 2015
New Revision: 221207

URL: https://gcc.gnu.org/viewcvs?rev=221207&root=gcc&view=rev
Log:
2015-03-05  Paolo Carlini  

PR c++/64665
* g++.dg/cpp0x/initlist92.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist92.C
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug c++/60685] exception not caught by enclosing catch

2015-03-05 Thread jens.maurer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60685

Jens Maurer  changed:

   What|Removed |Added

Version|4.8.2   |4.9.2

--- Comment #3 from Jens Maurer  ---
Jonathan's reduced testcase reproducibly crashes when compiled with gcc 4.9.2,
too.


[Bug rtl-optimization/65321] [5 Regression] ICE on valid code at -O2 and -O3 with -g enabled in decompose, at rtl.h:2007

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65321

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
 Status|NEW |ASSIGNED
  Component|debug   |rtl-optimization
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #2 from Richard Biener  ---
I will have a look.


[Bug lto/65316] [5 Regression] LTO: Uninitialized memory / ICE with -g -fno-lto-odr-type-merging: in types_same_for_odr, at ipa-devirt.c:465

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65316

Richard Biener  changed:

   What|Removed |Added

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


[Bug c++/64665] Overload resolution not working with std::initializer_list and bool

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64665

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #7 from Paolo Carlini  ---
Done.


[Bug ipa/65270] [5 regression] ICF needs to match TYPE attributes on memory accesses

2015-03-05 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #21 from rguenther at suse dot de  ---
On Wed, 4 Mar 2015, hubicka at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270
> 
> --- Comment #16 from Jan Hubicka  ---
> Richard,
> thanks, I also think alias trick makes gloal vars safe for merging across
> RESTRICT flags. 
> 
> One however needs to consider merging of items referring restricted vars.
> 
> const restrict int *a=&var;
> const int *b = &var; 
> 
> const int **ptrs1={&a};
> const int **ptrs2=[&b};
> 
> with -fmerge-all-constants we may merge ptrs1 and ptrs2 and, in the late
> compilation, in turn fold expression "ptrs2[0]" into a restricted pointer to
> var?

So we merge a and b with introducing an alias which is why we can
merge ptrs1 and ptrs2, correct?  But still with introducing an
alias.  But folding ptrs1[0] and ptrs2[0] will now return the same
(but random?) value.

Note that it's not folding that can introduce issues but points-to
analysis and what it computes for the globals ptrs1 and ptrs2
and thus for code that reads from them.

We are not really parsing constructors fully in PTA - at least I see

ptrs1 = NONLOCAL
ptrs1.0_2 = ptrs1
_3 = *ptrs1.0_2 
_4 = *_3

only for

int var;
const int * restrict a=&var;
const int *b = &var;

const int * const *ptrs1={&a};
const int * const *ptrs2={&b};

int main()
{
  return *(ptrs1[0]);
}

IPA PTA does sth funny though:

ptrs2 = NONLOCAL
b = NONLOCAL
var = NONLOCAL
b = &var
ESCAPED = &var
ptrs2 = &b
ESCAPED = &b
ptrs1 = NONLOCAL
a = &GLOBAL_RESTRICT
GLOBAL_RESTRICT = NONLOCAL
ptrs1 = &a
ESCAPED = &a

but obviously we don't seem to merge ptrs1/ptrs2.  But IPA PTA
needs quite some thoughts with respect to aliases I think (and
in other ways as well...).

> If this case is legit, the correct place to match RESTRICT flags is
> compare_cgraph_references. We can also go with your patch that will make A and
> B considered to be different and thus prevent merging PTRS1&PTRS2.

That would certainly be a safe thing to do.

Even with -flto -fmerge-all-constants we don't get ptrs1 and ptrs2
merged it seems (with -fwhole-program we fold stuff too early).

Richard.


[Bug c++/64431] "-Wignored-qualifiers" warning gives misleading position in code

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64431

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #4 from Paolo Carlini  ---
Mine.


[Bug ipa/65270] [5 regression] ICF needs to match TYPE attributes on memory accesses

2015-03-05 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #22 from rguenther at suse dot de  ---
On Thu, 5 Mar 2015, hubicka at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270
> 
> --- Comment #18 from Jan Hubicka  ---
> Here is summary of my current understanding of remaining issues from my last
> weekend's audit.
> 
> ICF specific:
>  - ipa-icf-gimple.c needs to match dependence analysis
>Richard has propsed a patch for it, so I hope he will commit it tomorrow.
>  - restrict flag may need to be matched when considering two references
>to variables being equal.
>Here I am waiting for Richards comment. I would propose matching restricts
> in compare_cgraph_references same way as we now compare vtables.

Works for me.  Having a testcase that shows the issue would be
nice though (I don't get the variables merged it seems, or somehow
the initializers prevail even on the aliases?)

> non-ICF specific wrong codes
>  - tree-vectorizer is picking up wrong alignment

Fixed.

>  - fold-const.c's operands_equal_p probably needs same treatment for
>comparing mem-ref as ipa-icf-gimple has.  I think in all cases one can
>construct testcase where tree-tail-merge would produce same incorrect
>merging as ipa-icf does.

No, it simply means that you can't use operand_equal_p (value equivalence)
if you want semantic equivalence in a greater scope.  This is why I
asked for the ICF and tail-merging stmt compare code to be unified ...

> stuff that can wait for next stage1
>  - ipa-pure-const is probably wrong to check TYPE_NEEDS_CONSTRUCTION flag
>(something to fix for next stage1)
>  - expand_builtin_classify_type can probably be dropped, because
> fold_classify_type prevails.


[Bug ipa/65270] [5 regression] ICF needs to match TYPE attributes on memory accesses

2015-03-05 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #23 from rguenther at suse dot de  ---
On Thu, 5 Mar 2015, hubicka at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270
> 
> --- Comment #19 from Jan Hubicka  ---
> I tried to construct a testcase for __restrict__ case:
> int var;
> const int *varptr=&var;
> const int *__restrict__ varptr2=&var;
> 
>  int *__restrict__ varptr3 = &var;
>  int *__restrict__ varptr4 = &var;
> 
> int *
> return_valptr(int i)
> {
>   return varptr[i];
> }
> int * __restrict__
> return_valptr2(int i)
> {
>   return varptr2[i];
> }
> int
> testrestrict ()
> {
>   int *ptr = return_valptr (0);
>   *ptr = 0;
>   *varptr3 = 1;
>   return *ptr;
> }
> int
> testrestrict2 ()
> {
>   int *ptr = return_valptr2 (0);
>   *ptr = 0;
>   *varptr3 = 1;
>   return *ptr;
> }
> int
> testrestrict4 ()
> {
>   *varptr4 = 0;
>   *varptr3 = 1;
>   return *varptr4;
> }
> 
> Here I would like restrict2 to return uncondtional 0, because ptr is taken 
> from
> a restrict pointer in a global var.  For whatever reason this optimization is
> not happening (it happens in testrestrict4). So perhaps we are safe to
> completely ignore restircts on vars, because we never get the flag in through
> folding.

We don't get it ever from folding.  Only IPA PTA looks at global 
constructors, local PTA doesn't - but that's a missed optimization
at least for readonly vars.  Can you please open a new bug with the above
testcase?


[Bug c++/65323] New: -Wzero-as-null-pointer-constant stutters

2015-03-05 Thread akim.demaille at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65323

Bug ID: 65323
   Summary: -Wzero-as-null-pointer-constant stutters
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: akim.demaille at gmail dot com

While tracking a spurious warning about at 0 instead of nullptr, I stumbled on
the following case, where g++ is spitting its warning too many times (4.9 and
5).

struct foo
{
  foo(void* = 0)  {}
  void fun(void* = 0) {}
  void* p = 0;
};

int main()
{
  foo f;
  f.fun();
}


g++-mp-5 -std=c++14 -Wzero-as-null-pointer-constant foo.cc 
foo.cc:3:15: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
   foo(void* = 0)  {}
   ^
foo.cc:3:15: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
foo.cc:4:20: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
   void fun(void* = 0) {}
^
foo.cc:4:20: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
foo.cc:5:13: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
   void* p = 0;
 ^


[Bug c++/65324] New: -Wzero-as-null-pointer-constant: incorrect location for function templates

2015-03-05 Thread akim.demaille at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65324

Bug ID: 65324
   Summary: -Wzero-as-null-pointer-constant: incorrect location
for function templates
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: akim.demaille at gmail dot com

template 
void fun(T, void* = 0) {}

int main()
{
  fun(0);
}

g++-mp-5 -O3 -Wzero-as-null-pointer-constant foo.cc 
foo.cc: In function 'void fun(T, void*) [with T = int]':
foo.cc:6:8: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
   fun(0);
^
foo.cc:6:8: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]


This is annoying, because it breaks the usefulness of -isystem: Boost still has
places where they use 0 instead of nullptr, in particular in template functions
with default arguments.  This triggers warnings in my own code, instead of in
the library (well, actually, I expect to have none at all in my case, since I
use -isystem).

Thanks!

(And please, note that it stutters too, as in #65323).


[Bug c++/62274] [C++11] Variadic templates expansion into non-variadic class template

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62274

--- Comment #5 from Jonathan Wakely  ---
EDG accepts it.


[Bug preprocessor/65238] [5 Regression] __has_attribute is not handled properly with -traditional-cpp.

2015-03-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65238

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

--- Comment #3 from Marek Polacek  ---
This patch seems to make __has_attribute work even in traditional cpp:

--- a/libcpp/traditional.c
+++ b/libcpp/traditional.c
@@ -497,6 +497,18 @@ _cpp_scan_out_logical_line (cpp_reader *pfile, cpp_macro
*macro)
  fmacro.line = pfile->line_table->highest_line;
  continue;
}
+ else if ((node->flags & NODE_BUILTIN) != 0
+  && node->value.builtin == BT_HAS_ATTRIBUTE)
+   {
+ pfile->out.cur = out_start;
+ /* Skip "__has_attribute".  */
+ _cpp_lex_token (pfile);
+ push_replacement_text (pfile, node);
+ /* Get rid of "(arg)" in the context.  */
+ CUR (context) = pfile->buffer->cur;
+ lex_state = ls_none;
+ goto new_context;
+   }
  else if (!recursive_macro (pfile, node))
{
  /* Remove the object-like macro's name from the


However there are other issues, so I'm afraid this will need more surgery than
that, so I'm dropping this for now :(.

1) We ICE with or without the patch on following valid code:

#define D unused
#if __has_attribute(D)
int i;
#endif

2) We ICE on the following invalid code with the patch:

#if __has_attribute(
int i;
#endif


[Bug c++/65322] Narrowing conversion

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65322

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
"b ? 1u : 0u" is not a constant expression, it depends on the variable b so the
value is not known until run-time.


[Bug c++/65322] Narrowing conversion

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65322

--- Comment #2 from Jonathan Wakely  ---
N.B. to make the code compile just don't use braces for the initialization:

: m_counter( b ? 1u : 0u )


[Bug rtl-optimization/65321] [5 Regression] ICE on valid code at -O2 and -O3 with -g enabled in decompose, at rtl.h:2007

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65321

Richard Biener  changed:

   What|Removed |Added

 CC||rsandifo at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
(gdb) p debug_rtx (x.first)
(const_int 128 [0x80])
(gdb) p x.second
$2 = QImode
(gdb) p precision 
$3 = 8

the CONST_INT is not properly sign-extended.  This is from

#6  0x00d55381 in simplify_const_binary_operation (code=ASHIFT, 
mode=QImode, op0=0x768d3490, op1=0x769e8b00)
at /space/rguenther/src/svn/trunk2/gcc/simplify-rtx.c:4001
...
3997case LSHIFTRT:
3998case ASHIFTRT:
3999case ASHIFT:
4000  {
4001wide_int wop1 = pop1;
4002if (SHIFT_COUNT_TRUNCATED)
4003  wop1 = wi::umod_trunc (wop1, width);

but of course the shift amount need not be QImode as well.  128 is quite large,
but well...

Fact is that we don't know the mode of op1 here.  From the fact that the
const_int is not sign-extended we can conclude its mode is larger than QImode.
And we will truncate it anyway (or return NULL_RTX) if it is too large, so
it doesn't even matter.

I think we can simply use

  wide_int wop1 = std::make_pair (op1, MAX_MODE_INT);

here (or SImode maybe).  Or have a "don't care" way to make a wide-int
from a CONST_INT directly.

Richard?


[Bug c++/65322] Narrowing conversion

2015-03-05 Thread wolfgang.roe...@gi-de.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65322

--- Comment #3 from Wolfgang Roehrl  ---
Hi Jonathan,

of course you are true. (I was overhasty with my bug report.)

Now I changed my program to using a constexpr-ctor:

#include "atomic"

struct S
{
explicit constexpr S (bool b = true)
: m_counter{ b ? 1u : 0u }
{}

std::atomic m_counter;
};

S x;

The compiler rejects this program too - is this correct?

Wolfgang






Von:"redi at gcc dot gnu.org" 
An: wolfgang.roe...@gi-de.com
Datum:  05.03.2015 11:54
Betreff:[Bug c++/65322] Narrowing conversion



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

--- Comment #2 from Jonathan Wakely  ---
N.B. to make the code compile just don't use braces for the 
initialization:

: m_counter( b ? 1u : 0u )


[Bug ipa/65270] [5 regression] ICF needs to match TYPE attributes on memory accesses

2015-03-05 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #24 from Martin Liška  ---
(In reply to rguent...@suse.de from comment #22)
> On Thu, 5 Mar 2015, hubicka at gcc dot gnu.org wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270
> > 
> > --- Comment #18 from Jan Hubicka  ---
> > Here is summary of my current understanding of remaining issues from my last
> > weekend's audit.
> > 
> > ICF specific:
> >  - ipa-icf-gimple.c needs to match dependence analysis
> >Richard has propsed a patch for it, so I hope he will commit it tomorrow.
> >  - restrict flag may need to be matched when considering two references
> >to variables being equal.
> >Here I am waiting for Richards comment. I would propose matching 
> > restricts
> > in compare_cgraph_references same way as we now compare vtables.
> 
> Works for me.  Having a testcase that shows the issue would be
> nice though (I don't get the variables merged it seems, or somehow
> the initializers prevail even on the aliases?)
> 
> > non-ICF specific wrong codes
> >  - tree-vectorizer is picking up wrong alignment
> 
> Fixed.
> 
> >  - fold-const.c's operands_equal_p probably needs same treatment for
> >comparing mem-ref as ipa-icf-gimple has.  I think in all cases one can
> >construct testcase where tree-tail-merge would produce same incorrect
> >merging as ipa-icf does.
> 
> No, it simply means that you can't use operand_equal_p (value equivalence)
> if you want semantic equivalence in a greater scope.  This is why I
> asked for the ICF and tail-merging stmt compare code to be unified ...

Still on my radar, few months ago, I was able to come up with prototype that
was at least as good as current implementation. It can be adopted for next
release.

> 
> > stuff that can wait for next stage1
> >  - ipa-pure-const is probably wrong to check TYPE_NEEDS_CONSTRUCTION flag
> >(something to fix for next stage1)
> >  - expand_builtin_classify_type can probably be dropped, because
> > fold_classify_type prevails.

[Bug c++/65322] Narrowing conversion

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65322

--- Comment #4 from Jonathan Wakely  ---
(In reply to Wolfgang Roehrl from comment #3)
> The compiler rejects this program too - is this correct?

Yes. Adding constexpr to the constructor only means that it *can* be used in
constant-expressions, not that it is always a constant-expression, so in the
general case 'b' is still a run-time variable not a constant.

Just use m_counter( b ? 1u : 0u ) or m_counter{ short(b ? 1u : 0u) }


[Bug c++/65159] Linker forgets definition of type_info::__is_pointer_p

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65159

Jonathan Wakely  changed:

   What|Removed |Added

 Target||x86_64-apple-darwin*

--- Comment #2 from Jonathan Wakely  ---
Other people are building OK on Darwin so you'll need to give more info.


[Bug c++/65322] Narrowing conversion

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65322

--- Comment #5 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #4)
> Just use m_counter( b ? 1u : 0u ) or m_counter{ short(b ? 1u : 0u) }

Oops, the second one should be m_counter{ (unsigned short)(b ? 1u : 0u) }


[Bug c++/65322] Narrowing conversion

2015-03-05 Thread wolfgang.roe...@gi-de.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65322

--- Comment #6 from Wolfgang Roehrl  ---
Thank you and have a nice day!


Vorsitzender des Aufsichtsrats: Dr. Peter-Alexander Wacker
Geschäftsführer: Dr. Walter Schlebusch (Vorsitzender, CEO),
Stefan Auerbach, Hans Wolfgang Kunz, Ralf Wintergerst, Dr. Peter Zattler 
(CFO)
Gesellschaftssitz: München, Handelsregister Amtsgericht München HRB 4619

* * * Welcome to the Connected Society * * *

Meet G&D at the Mobile World Congress 2015
March 2 - 5
Booth 7A41, Hall 7

[Bug c++/64892] [C++14] generic lambdas, decltype(auto), and rvalue references, oh my!

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64892

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-03-05
Summary|C++1y: generic lambdas, |[C++14] generic lambdas,
   |decltype(auto), and rvalue  |decltype(auto), and rvalue
   |references, oh my!  |references, oh my!
 Ever confirmed|0   |1

--- Comment #3 from Jonathan Wakely  ---
(In reply to Harald van Dijk from comment #2)
> Reduced:
> 
>   int&& i = 0;
>   decltype(auto) j = i;
> 
> or
> 
>   decltype(auto) f(int&&r) { return r; }
> 
> should both give an error, and do with clang, but are silently accepted by
> gcc.

Confirmed. EDG rejects them both too.


[Bug ada/65319] FAIL: g++.dg/other/dump-ada-spec-3.C -std=gnu++98 (internal compiler error)

2015-03-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65319

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-03-05
 Ever confirmed|0   |1

--- Comment #2 from Eric Botcazou  ---
Valgrind complains.


[Bug ada/65319] FAIL: g++.dg/other/dump-ada-spec-3.C -std=gnu++98 (internal compiler error)

2015-03-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65319

Eric Botcazou  changed:

   What|Removed |Added

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


[Bug ipa/65318] [5 Regression] wrong code at -Os and above on x86_64-linux-gnu

2015-03-05 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65318

--- Comment #2 from Martin Liška  ---
Created attachment 34962
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34962&action=edit
Suggested patch

[Bug c/65325] New: float/interger operation needs cast with 02 switch.

2015-03-05 Thread scerv...@connected-labs.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325

Bug ID: 65325
   Summary: float/interger operation needs cast with 02 switch.
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: scerv...@connected-labs.com

A bug has been reported to gstreamer bug tracker: 

https://bugzilla.gnome.org/show_bug.cgi?id=745667

This bug seems to be related to gcc optimization behaviour. The operations
needs specific cast for operation with double and integers.


[Bug c/65325] float/interger operation needs cast with 02 switch.

2015-03-05 Thread slomo at coaxion dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325

Sebastian Dröge  changed:

   What|Removed |Added

 CC||slomo at coaxion dot net

--- Comment #1 from Sebastian Dröge  ---
To provide more details, the code in question is basically

float x = ...;
int y = x * INTEGER_LITERAL;

if x < 1.0, this always resulted in 0. Adding casts like

int y = (int) ((double) x * (double) INTEGER_LITERAL);

fixed it.


The problem only happened with -O1 and -O2 on ARM(v7), not with -O0. And also
went away after adding some debug printf() around the code in question.


gcc 4.9 was used here.

[Bug c/65325] float/interger operation needs cast with 02 switch.

2015-03-05 Thread slomo at coaxion dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325

--- Comment #2 from Sebastian Dröge  ---
http://comments.gmane.org/gmane.linux.embedded.yocto.meta-freescale/13018 also
has other mentions of this bug.

[Bug ada/65319] FAIL: g++.dg/other/dump-ada-spec-3.C -std=gnu++98 (internal compiler error)

2015-03-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65319

--- Comment #3 from Eric Botcazou  ---
Author: ebotcazou
Date: Thu Mar  5 13:54:19 2015
New Revision: 221213

URL: https://gcc.gnu.org/viewcvs?rev=221213&root=gcc&view=rev
Log:
PR ada/65319
* c-ada-spec.c (print_destructor): Remove obsolete code.

Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-ada-spec.c


[Bug ada/65319] FAIL: g++.dg/other/dump-ada-spec-3.C -std=gnu++98 (internal compiler error)

2015-03-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65319

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #5 from Eric Botcazou  ---
Presumably fixed, reopen if not.


[Bug ada/65319] FAIL: g++.dg/other/dump-ada-spec-3.C -std=gnu++98 (internal compiler error)

2015-03-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65319

--- Comment #4 from Eric Botcazou  ---
Author: ebotcazou
Date: Thu Mar  5 13:55:43 2015
New Revision: 221214

URL: https://gcc.gnu.org/viewcvs?rev=221214&root=gcc&view=rev
Log:
PR ada/65319
* c-ada-spec.c (print_destructor): Remove obsolete code.

Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/other/dump-ada-spec-3.C
  - copied unchanged from r221212,
trunk/gcc/testsuite/g++.dg/other/dump-ada-spec-3.C
Modified:
branches/gcc-4_9-branch/gcc/c-family/ChangeLog
branches/gcc-4_9-branch/gcc/c-family/c-ada-spec.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug c/65325] float/interger operation needs cast with 02 switch.

2015-03-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2015-03-05
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Marek Polacek  ---
Can you please provide a stand-alone testcase (that maybe calls abort() if the
alleged bug occurs)?


[Bug tree-optimization/61607] DOM missed jump threading and destroyed loops

2015-03-05 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61607

--- Comment #11 from Yvan Roux  ---
Author: yroux
Date: Thu Mar  5 14:28:05 2015
New Revision: 221216

URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05  Yvan Roux  

Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.

2014-12-15  Richard Biener  

PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.

2014-09-08  Richard Biener  

PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.

2014-09-08  Richard Biener  

PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.

2014-06-26  Richard Biener  

PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.

gcc/testsuite/
2015-03-05  Yvan Roux  

Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.

2014-12-15  Richard Biener  

PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.


Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


[Bug middle-end/64083] [5 Regression] ICE: in fix_loop_structure, at loop-init.c:252 compiling Linux Kernel

2015-03-05 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64083

--- Comment #6 from Yvan Roux  ---
Author: yroux
Date: Thu Mar  5 14:28:05 2015
New Revision: 221216

URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05  Yvan Roux  

Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.

2014-12-15  Richard Biener  

PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.

2014-09-08  Richard Biener  

PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.

2014-09-08  Richard Biener  

PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.

2014-06-26  Richard Biener  

PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.

gcc/testsuite/
2015-03-05  Yvan Roux  

Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.

2014-12-15  Richard Biener  

PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.


Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


[Bug tree-optimization/64284] [5 Regression] ICE: Segmentation fault

2015-03-05 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64284

--- Comment #6 from Yvan Roux  ---
Author: yroux
Date: Thu Mar  5 14:28:05 2015
New Revision: 221216

URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05  Yvan Roux  

Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.

2014-12-15  Richard Biener  

PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.

2014-09-08  Richard Biener  

PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.

2014-09-08  Richard Biener  

PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.

2014-06-26  Richard Biener  

PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.

gcc/testsuite/
2015-03-05  Yvan Roux  

Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.

2014-12-15  Richard Biener  

PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.


Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


[Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab

2015-03-05 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878

--- Comment #9 from Yvan Roux  ---
Author: yroux
Date: Thu Mar  5 14:28:05 2015
New Revision: 221216

URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05  Yvan Roux  

Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.

2014-12-15  Richard Biener  

PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.

2014-09-08  Richard Biener  

PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.

2014-09-08  Richard Biener  

PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.

2014-06-26  Richard Biener  

PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.

gcc/testsuite/
2015-03-05  Yvan Roux  

Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.

2014-12-15  Richard Biener  

PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.


Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


[Bug ipa/63196] [5.0 regression] FAIL: g++.dg/torture/pr57140.C -O3 -fomit-frame-pointer (internal compiler error)

2015-03-05 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63196

--- Comment #6 from Yvan Roux  ---
Author: yroux
Date: Thu Mar  5 14:28:05 2015
New Revision: 221216

URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05  Yvan Roux  

Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.

2014-12-15  Richard Biener  

PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.

2014-09-08  Richard Biener  

PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.

2014-09-08  Richard Biener  

PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.

2014-06-26  Richard Biener  

PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.

gcc/testsuite/
2015-03-05  Yvan Roux  

Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.

2014-12-15  Richard Biener  

PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.


Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


[Bug bootstrap/63204] gtype-desc.c:887:40: error: 'struct loop' has no member named 'former_header' breaks bootstrap

2015-03-05 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63204

--- Comment #5 from Yvan Roux  ---
Author: yroux
Date: Thu Mar  5 14:28:05 2015
New Revision: 221216

URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05  Yvan Roux  

Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.

2014-12-15  Richard Biener  

PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.

2014-09-08  Richard Biener  

PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.

2014-09-08  Richard Biener  

PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.

2014-06-26  Richard Biener  

PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.

gcc/testsuite/
2015-03-05  Yvan Roux  

Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.

2014-12-15  Richard Biener  

PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.


Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


[Bug middle-end/64246] [5 Regression] ICE building libada for Windows due to NULL loop header

2015-03-05 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64246

--- Comment #12 from Yvan Roux  ---
Author: yroux
Date: Thu Mar  5 14:28:05 2015
New Revision: 221216

URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05  Yvan Roux  

Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.

2014-12-15  Richard Biener  

PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.

2014-09-08  Richard Biener  

PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.

2014-09-08  Richard Biener  

PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.

2014-09-05  Richard Biener  

* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.

2014-06-26  Richard Biener  

PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.

gcc/testsuite/
2015-03-05  Yvan Roux  

Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06  Sebastian Pop  
Brian Rzycki  

PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.

2014-12-15  Richard Biener  

PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.

2014-12-15  Richard Biener  

PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.

2014-11-27  Richard Biener  

PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.


Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


[Bug libgcc/65306] make error with clang on OSX 10.9.5 -- movq

2015-03-05 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65306

--- Comment #11 from howarth at bromo dot med.uc.edu ---
I see no problems here on darwin13.4.0 (with mpc-1.0.2, gmp-6.0.0a, mpfr-3.1.2,
isl-0.12.2 and cloog-0.18.2 present in the gcc-4_9-branch svn tree as mpc, gmp,
mpfr, isl and cloog) using...

cd work
../gcc-4.9.3-20150227/configure --prefix=/Users/howarth/dist
--enable-languages=c,c++ --with-system-zlib --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --enable-threads --enable-static
make -j8 bootstrap

The in-tree bootstrap completes without errors.


[Bug target/64342] [5 Regression] Tests failing when compiled with '-m32 -fpic' after r216154.

2015-03-05 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64342

--- Comment #15 from Vladimir Makarov  ---
Jeff, thanks for the detail analysis.  It helped me a lot.  I am working on the
patch fixing the problem.  I hope it will be ready today.


[Bug rtl-optimization/64317] [5 Regression] Ineffective allocation of PIC base register

2015-03-05 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64317

--- Comment #21 from Vladimir Makarov  ---
(In reply to Jeffrey A. Law from comment #17)
> Thanks Vlad, that patch helped.  Prior to your patch we had 15 reloads of
> the PIC register from memory, after your patch we have just 9.   However,
> several of the remaining 9 seem to be redundant.
> 
> LRA never considers a block starting with a label as participating in an
> EBB.  That's overly conservative.  A block can participate in an EBB if all
> of its predecessors are part of the same EBB.
> 
> That's particularly useful in CFGs like
>  
> A
>/|
>   / |
>  B  |
>   \ |
>\|
> C
> 
> [ Flow downward of course. ]
> 
> 
> If we assume that B is the fallthru path, then LRA will try to make AB into
> an EBB.  But it will not consider C because C will start with a label.  That
> ultimately causes missed inheritances in this example.

I am agree the bigger scope would help but it is hard to implement.  If we
consider the graph hammock structure, inherited value of pseudo P in A to C
might be changed in B.  It works if we don't change it in B but then the
structure can be dependent on considered pseudos for inheritance.  It is harder
to update live info too and to undo inheritance transformations if they fail.

The biggest problem with PIC pseudo is in that it can not treated as the rest
of pseudos with live range splitting perspective because of possible creation
of memory with pic pseudo value.  It is hard to decide what pseudo (or hard
register) to use for such memory in a particular place as it can be in
different pseudos (hard registers) if we permit usual pseudo live range
splitting for pic pseudo.


[Bug c/65325] float/interger operation needs cast with 02 switch.

2015-03-05 Thread scerv...@connected-labs.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325

--- Comment #4 from Stephane Cerveau  ---
http://pastebin.com/stQFwaSg

Here is a sample which is supposed to describe the same behaviour as in
gstvolume.c but i'm not able to reproduce it with this code.

Here is my build command line:

arm-oad-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard
-mfpu=neon -mtune=cortex-a9 -O2 -pipe -g -feliminate-unused-debug-types
test_float.c -o test_float


[Bug c/65325] float/interger operation needs cast with 02 switch.

2015-03-05 Thread scerv...@connected-labs.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325

--- Comment #5 from Stephane Cerveau  ---
Created attachment 34963
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34963&action=edit
assembly code

Here is the command line:

arm-oad-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard
-mfpu=neon -mtune=cortex-a9
--sysroot=/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter
-std=gnu99 -DHAVE_CONFIG_H -I.
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/work/cortexa9hf-vfp-neon-mx6-oad-linux-gnueabi/gstreamer1.0-plugins-base/1.4.1-r0/gst-plugins-base-1.4.1/gst/volume
-I../..
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/work/cortexa9hf-vfp-neon-mx6-oad-linux-gnueabi/gstreamer1.0-plugins-base/1.4.1-r0/gst-plugins-base-1.4.1/gst-libs
-I../../gst-libs -pthread
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/include/gstreamer-1.0
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/include/glib-2.0
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/lib/glib-2.0/include
-pthread
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/include/glib-2.0
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/lib/glib-2.0/include
-pthread
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/include/gstreamer-1.0
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/include/glib-2.0
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/lib/glib-2.0/include
-DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -Wall
-Wdeclaration-after-statement -Wvla -Wpointer-arith -Wmissing-declarations
-Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings
-Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-include-dirs
-Waddress -Waggregate-return -Wno-multichar -Wnested-externs
-I/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/sysroots/jupiter/usr/include/orc-0.4
-O2 -pipe -g -feliminate-unused-debug-types -S
/home/sce/DEV/yocto-oad-dizzy/build_oad-jupiter/tmp/work/cortexa9hf-vfp-neon-mx6-oad-linux-gnueabi/gstreamer1.0-plugins-base/1.4.1-r0/gst-plugins-base-1.4.1/gst/volume/gstvolume.c
 -fPIC -DPIC -o .libs/libgstvolume_la-gstvolume.o


[Bug middle-end/65315] incorrect alignment of local variable with aligned attribute

2015-03-05 Thread sje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65315

--- Comment #3 from Steve Ellcey  ---
Author: sje
Date: Thu Mar  5 16:34:03 2015
New Revision: 221219

URL: https://gcc.gnu.org/viewcvs?rev=221219&root=gcc&view=rev
Log:
2015-03-05  Steve Ellcey  

PR middle-end/65315
* cfgexpand.c (expand_stack_vars): Update large_align to maximum
needed alignment.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c


[Bug middle-end/64928] [4.8/4.9/5 Regression] Inordinate cpu time and memory usage in "phase opt and generate" with -ftest-coverage -fprofile-arcs

2015-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64928

--- Comment #11 from Richard Biener  ---
Ok, so it's already calculate_live_ranges that takes much memory.  I have a
small patch to improve that somewhat.

But what we really need is to get the "must coalesce" stuff "coalesced" with
respect to both live and conflict computation.  That is, map must-coalesce
SSA vars to the same partition.  That loses the SSA corruption testing, but
well so it might be much more controversical (silent wrong-code instead of
ICE).
Unfortunately in the testcase there are only 2750 must-coalesces but
109493 partitions participating in the coalescing (so at least 5 want
coalesces).

The good news is of course that we can simply choose to _not_ coalesce that
many variables, but say only the important ones.


[Bug target/65326] New: LRA missing a Thumb optimization.

2015-03-05 Thread matthew.wahab at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65326

Bug ID: 65326
   Summary: LRA missing a Thumb optimization.
   Product: gcc
   Version: 4.9.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: matthew.wahab at arm dot com

Created attachment 34964
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34964&action=edit
Testcase showing change in behaviour.

The ARM backend no longer supports -mno-lra so only the LRA is available. This
has also removed the Thumb mode optimiziation introduced in
https://gcc.gnu.org/ml/gcc-patches/2005-08/msg01140.html to fix PR 23436.

This turns sequences like
 movr3, r9
movr2, r10
ldrr0, [r3, r2]
into
movr3, r9
addr3, r3, r10
ldrr0, [r3]
which saves a register.

Attached is a contrived test case. Compiling with gcc-4.9 with -mthumb -mno-lra 
(at -O1 and higher) produces the second (better) sequence. Compiling with
gcc-4.9 or gcc-trunk with -mthumb (at -O1 and higher) produces the first
sequence. The sequences appear after the 'nop'

gcc-4.9 is 
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119
(release) [ARM/embedded-4_9-branch revision 218278]

trunk is:
arm-none-eabi-gcc (unknown) 5.0.0 20150217 (experimental)


[Bug libstdc++/63860] Ill-formed std::pair::swap implementation?

2015-03-05 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63860

Ville Voutilainen  changed:

   What|Removed |Added

 CC||ville.voutilainen at gmail dot 
com

--- Comment #6 from Ville Voutilainen  ---
This is
http://cplusplus.github.io/LWG/lwg-active.html#2456
and I have a patch for it at
https://github.com/villevoutilainen/gcc/tree/is_nothrow_swappable
which will be submitted after gcc5 is released.


[Bug c++/65327] New: GCC rejects "constexpr volatile int i = 5;"

2015-03-05 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65327

Bug ID: 65327
   Summary: GCC rejects "constexpr volatile int i = 5;"
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Casey at Carter dot net

See
http://stackoverflow.com/questions/28883510/can-constexpr-be-combined-with-volatile
for discussion. GCC 5 (Identified as "5.0.0 HEAD 20150304" on Wandbox at
http://melpon.org/wandbox/permlink/u7BC3wFEfMv0zrVN) rejects this program:

int main() {
constexpr volatile int i = 5;
}

with the diagnostic:

prog.cc: In function 'int main()':
prog.cc:3:28: error: both 'volatile' and 'constexpr' cannot be used here
constexpr volatile int i = 5;

AFAICT, this program is well-formed: `constexpr` can be applied to literal
types, which includes scalar types, which includes cv-qualified arithmetic
types. Semantically, I *think* "constexpr volatile" is equivalent to "const
volatile" since "constexpr" objects are implicitly "const" but lvalue-to-rvalue
conversions applied to volatile glvalues cannot be part of a
core-constant-expression.


[Bug ipa/65318] [5 Regression] wrong code at -Os and above on x86_64-linux-gnu

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65318

--- Comment #3 from Jan Hubicka  ---
Author: hubicka
Date: Thu Mar  5 17:49:49 2015
New Revision: 221221

URL: https://gcc.gnu.org/viewcvs?rev=221221&root=gcc&view=rev
Log:
PR ipa/65318
* ipa-icf.c (sem_variable::equals): Compare variables types.
* gcc.dg/ipa/pr65318.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/ipa/pr65318.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-icf.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/64431] "-Wignored-qualifiers" warning gives misleading position in code

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64431

--- Comment #5 from Paolo Carlini  ---
Note that, besides the cases of volatile and restrict which should be also
included, already have a patch including those, we need further tweaks to
recover the location of 'const' in:

   int* const f9();


[Bug tree-optimization/65303] Tracking bug for ICF issues

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65303
Bug 65303 depends on bug 65318, which changed state.

Bug 65318 Summary: [5 Regression] wrong code at -Os and above on 
x86_64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65318

   What|Removed |Added

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


[Bug ipa/65318] [5 Regression] wrong code at -Os and above on x86_64-linux-gnu

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65318

Jan Hubicka  changed:

   What|Removed |Added

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

--- Comment #4 from Jan Hubicka  ---
Fixed.


[Bug c++/65328] New: GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread juchem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

Bug ID: 65328
   Summary: GCC perf issue when compiling templates - 120x slower
than Clang
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: juchem at gmail dot com

Debian's g++ 4.9.2 and gcc 4.8.4 are extremely slow at compiling some
templates.

They take more than 1h to compile the same code that Clang 3.4 needs 39
seconds. 

How to reproduce:

  $ git clone https://github.com/facebook/fatal.git \
&& cd fatal && git checkout -b dev origin/dev \
&& clang++-3.4 --version && time clang++-3.4 -Wall -std=c++11 -I . \
  fatal/type/benchmark/prefix_tree_benchmark.cpp \
&& g++-4.8 --version && time g++-4.8 -Wall -std=c++11 -I . \
  fatal/type/benchmark/prefix_tree_benchmark.cpp \
&& g++-4.9 --version && time g++-4.9 -Wall -std=c++11 -I . \
  fatal/type/benchmark/prefix_tree_benchmark.cpp

Output:

Cloning into 'fatal'...
remote: Counting objects: 1124, done.
remote: Compressing objects: 100% (226/226), done.
remote: Total 1124 (delta 119), reused 0 (delta 0), pack-reused 884
Receiving objects: 100% (1124/1124), 803.31 KiB | 1.20 MiB/s, done.
Resolving deltas: 100% (727/727), done.
Checking connectivity... done.
Branch dev set up to track remote branch dev from origin.
Switched to a new branch 'dev'

Debian clang version 3.4.2-13 (tags/RELEASE_34/dot2-final) (based on LLVM
3.4.2)
Target: x86_64-pc-linux-gnu
Thread model: posix

real0m39.205s
user0m37.416s
sys 0m1.432s

g++-4.8 (Debian 4.8.4-1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


real64m37.227s
user61m42.556s
sys 0m10.604s

g++-4.9 (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


real65m33.790s
user63m52.544s
sys 0m7.664s


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

--- Comment #1 from Andrew Pinski  ---
This is not that useful.  Can you provide the preprocessed source for the file
which is taking a long time?


[Bug c++/65327] GCC rejects "constexpr volatile int i = 5;"

2015-03-05 Thread yaghmour.shafik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65327

Shafik Yaghmour  changed:

   What|Removed |Added

 CC||yaghmour.shafik at gmail dot 
com

--- Comment #1 from Shafik Yaghmour  ---
Defect report 1688:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4093.html#1688
confirms that this is valid, and it says:

"The combination is intentionally permitted and could be used in some
circumstances to force constant initialization."


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

--- Comment #2 from Jan Hubicka  ---
Can youm please attach the preprocessed source files (generated with -E) to
reproduce the problem and also compile with -ftime-report and post the output?


Re: [Bug c++/65328] New: GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread Jan Hubicka
Can youm please attach the preprocessed source files (generated with -E) to
reproduce the problem and also compile with -ftime-report and post the output?


[Bug rtl-optimization/65067] regression on accessing volatile bit field

2015-03-05 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65067

--- Comment #11 from Bernd Edlinger  ---
Author: edlinger
Date: Thu Mar  5 18:56:37 2015
New Revision: 221222

URL: https://gcc.gnu.org/viewcvs?rev=221222&root=gcc&view=rev
Log:
gcc:
2015-03-05  Bernd Edlinger  

PR rtl-optimization/65067
* expmed.c (store_bit_field, extract_bit_field): Reworked the
strict volatile bitfield handling.

testsuite:
2015-03-05  Bernd Edlinger  

* gcc.target/arm/pr65067.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/arm/pr65067.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expmed.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread juchem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

--- Comment #3 from juchem at gmail dot com ---
Created attachment 34965
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34965&action=edit
preprocessed files from gcc 4.9

generated with:

$ time g++-4.9 -Wall -std=c++11 -E -I .
fatal/type/benchmark/prefix_tree_benchmark.cpp

real0m0.468s
user0m0.452s
sys 0m0.016s


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread juchem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

juchem at gmail dot com changed:

   What|Removed |Added

  Attachment #34966|0   |1
is obsolete||

--- Comment #5 from juchem at gmail dot com ---
Created attachment 34967
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34967&action=edit
preprocessed file from gcc 4.8

generated with:

$ time g++-4.8 -Wall -std=c++11 -E -I .
fatal/type/benchmark/prefix_tree_benchmark.cpp

real0m0.450s
user0m0.424s
sys 0m0.020s


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread juchem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

juchem at gmail dot com changed:

   What|Removed |Added

  Attachment #34965|0   |1
is obsolete||

--- Comment #6 from juchem at gmail dot com ---
Created attachment 34968
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34968&action=edit
preprocessed file from gcc 4.9

generated with:

$ time g++-4.9 -Wall -std=c++11 -E -I .
fatal/type/benchmark/prefix_tree_benchmark.cpp

real0m0.468s
user0m0.452s
sys 0m0.016s


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread juchem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

--- Comment #4 from juchem at gmail dot com ---
Created attachment 34966
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34966&action=edit
preprocessed file from gcc 4.8

generated with:

$ time g++-4.8 -Wall -std=c++11 -E -I .
fatal/type/benchmark/prefix_tree_benchmark.cpp

real0m0.450s
user0m0.424s
sys 0m0.020s


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread juchem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

--- Comment #7 from juchem at gmail dot com ---
Created attachment 34969
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34969&action=edit
FWIW, preprocessed file from clang 3.4

generated with:

$ time clang++-3.4 -Wall -std=c++11 -E -I .
fatal/type/benchmark/prefix_tree_benchmark.cpp > clang-3.4-preprocessed.cpp

real0m0.224s
user0m0.188s
sys 0m0.028s


[Bug rtl-optimization/64886] FAIL: gcc.dg/pr64434.c scan-rtl-dump-times expand "Swap operands" 1

2015-03-05 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64886

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


[Bug libstdc++/65329] New: [C++14] constexpr complex::real(), imag() are non-const

2015-03-05 Thread g...@axel-naumann.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65329

Bug ID: 65329
   Summary: [C++14] constexpr complex::real(), imag() are
non-const
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: g...@axel-naumann.de

Hi,

N3669 wants "constexpr std::complex::real() const" but
https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00664.html#a26d289a887c06b2d66fd02dbcd345678
claims that didn't happen so far in libstdc++ despite it claiming to implement
N3669
.

Could that be fixed, please? Same for imag() of course.

Cheers, Axel.


[Bug c++/65328] GCC perf issue when compiling templates - 120x slower than Clang

2015-03-05 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

Markus Trippelsdorf  changed:

   What|Removed |Added

   Keywords||compile-time-hog
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-03-05
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #8 from Markus Trippelsdorf  ---
It is also interesting that gcc-5 rejects the testcase (4.8, 4.9 and clang
accept it):

In file included from ./fatal/type/pair.h:14:0,
 from ./fatal/type/list.h:13,
 from ./fatal/type/map.h:13,
 from ./fatal/type/prefix_tree.h:13,
 from fatal/type/benchmark/prefix_tree_benchmark.cpp:10:
./fatal/type/transform.h:1811:48: error: expected template-name before ‘<’
token
   using apply = typename with<>::template apply;
^
./fatal/type/transform.h:1811:48: error: expected identifier before ‘<’ token
In file included from ./fatal/type/reflect_template.h:14:0,
 from ./fatal/type/reflection.h:14,
 from ./fatal/type/prefix_tree.h:14,
 from fatal/type/benchmark/prefix_tree_benchmark.cpp:10:
./fatal/type/sequence.h: In static member function ‘static constexpr const
type* fatal::constant_sequence::data()’:
./fatal/type/sequence.h:150:48: error: incomplete type
‘fatal::constant_sequence::array<> {aka fatal::constant_array}’ used in nested name specifier
   static constexpr type const *data() { return array<>::data(); }
^
./fatal/type/sequence.h: In static member function ‘static constexpr const
type* fatal::constant_sequence::z_data()’:
./fatal/type/sequence.h:175:50: error: incomplete type
‘fatal::constant_sequence::z_array<> {aka fatal::constant_array(0)>}’ used in nested name specifier
   static constexpr type const *z_data() { return z_array<>::data(); }
  ^
while it still keeps running afterwards.

perf shows (I only ran it for ~2 minutes):

gcc-4.8
  21.48%  cc1plus  cc1plus[.] comp_template_args_with_info
  16.94%  cc1plus  cc1plus[.] structural_comptypes
   8.23%  cc1plus  cc1plus[.] htab_find_slot_with_hash
   7.02%  cc1plus  cc1plus[.] cp_tree_equal
   6.91%  cc1plus  cc1plus[.] typename_compare
   6.72%  cc1plus  cc1plus[.] eq_specializations
   5.39%  cc1plus  cc1plus[.] cp_type_quals

gcc-4.9
  22.90%  cc1plus  cc1plus[.] structural_comptypes
  21.53%  cc1plus  cc1plus[.] eq_specializations
   8.20%  cc1plus  cc1plus[.] make_typename_type
   6.27%  cc1plus  cc1plus[.] template_args_equal
   5.88%  cc1plus  cc1plus[.] comp_template_args_with_info
   5.82%  cc1plus  cc1plus[.] cp_tree_equal
   5.53%  cc1plus  cc1plus[.] typename_compar

gcc-5
  26.96%  cc1plus  cc1plus  [.] make_typename_type
  20.37%  cc1plus  cc1plus  [.] template_args_equal
  13.03%  cc1plus  cc1plus  [.] structural_comptypes
   5.17%  cc1plus  cc1plus  [.] cp_tree_equal
   4.43%  cc1plus  cc1plus  [.] tsubst_aggr_type
   4.15%  cc1plus  cc1plus  [.] comptypes

[Bug libstdc++/65329] [C++14] constexpr complex::real(), imag() are non-const

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65329

--- Comment #1 from Jonathan Wakely  ---
The doxygen docs are not up to date. This should be fixed at r216258


[Bug c++/65314] invalid type for array subscript

2015-03-05 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65314

Daniel Krügler  changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #1 from Daniel Krügler  ---
(In reply to Mina Pina from comment #0)
> I dont seem to be able to fix this bug 

You have submitted an issue in a bug and feature reporting tool. If that should
be considered as a possible bug, the minimum that needs to be provided is a
full-fledged (minimalistic) code, that demonstrates the problem. The code you
have provided is not complete (Most critical is what the declarations of 'inf'
are, I guess) and there is nothing I can see from the provided code this
tracking system can do for you. Please ask you question in a public forum
suitable for such questions and return back to this tracker if the discussions
clarifies that you are observing a compiler bug.

[Bug target/64342] [5 Regression] Tests failing when compiled with '-m32 -fpic' after r216154.

2015-03-05 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64342

--- Comment #16 from Vladimir Makarov  ---
Author: vmakarov
Date: Thu Mar  5 19:43:11 2015
New Revision: 221223

URL: https://gcc.gnu.org/viewcvs?rev=221223&root=gcc&view=rev
Log:
2015-03-05  Vladimir Makarov  

PR target/64342
* lra-assigns.c (find_hard_regno_for): Rename to
find_hard_regno_for_1.  Add a new parameter.
(find_hard_regno_for): New function using find_hard_regno_for_1.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-assigns.c


[Bug ipa/65270] issues with merging memory accesses from different code paths

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

Jan Hubicka  changed:

   What|Removed |Added

Summary|[5 regression] ICF needs to |issues with merging memory
   |match TYPE attributes on|accesses from different
   |memory accesses |code paths

--- Comment #25 from Jan Hubicka  ---
I think the ICF wrong code mentioned here should be now all fixed.  

I did not manage to create a testcase for RESTRICT flag unification, because
the RESTRICT flag seems to not be taken into an account when the variable is
references thorough pointer to another variable.

I think we do have problem with operand_equal_p being used across different
contexts in several cases (not only in tree-tail-merge). Perhaps for next
stage1 we ought to separate the logic into icf-op class that will have enough
flexibility to do the right thing in all cases? (i.e. have valueize hook that
can be used by ICF to prove equivalences across classes and in addition to
existing operand_equal_p flags it will actually know if it should match memory
attributes because the operands come from different code path/broader context). 

icf-op also should have hash method to produce stable hash so it can be plugged
into icf-gimple (that in turn can be plugged into tree-tail-merge).


[Bug rtl-optimization/64886] FAIL: gcc.dg/pr64434.c scan-rtl-dump-times expand "Swap operands" 1

2015-03-05 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64886

--- Comment #2 from John David Anglin  ---
Revised test1.c testcase attached to PR64434 would pass on hppa64-hp-hpux11.11.


[Bug middle-end/65330] New: restrict should be considered when folding through references from global vars

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65330

Bug ID: 65330
   Summary: restrict should be considered when folding through
references from global vars
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hubicka at gcc dot gnu.org

In the following testcase the restrict should be taken into account when
folding testrestrict.

const int *varptr=&var;
const int *__restrict__ varptr2=&var;

 int *__restrict__ varptr3 = &var;
 int *__restrict__ varptr4 = &var;

int *
return_valptr(int i)
{
  return varptr[i];
}
int * __restrict__
return_valptr2(int i)
{
  return varptr2[i];
}
int
testrestrict ()
{
  int *ptr = return_valptr (0);
  *ptr = 0;
  *varptr3 = 1;
  return *ptr;
}
int
testrestrict2 ()
{
  int *ptr = return_valptr2 (0);
  *ptr = 0;
  *varptr3 = 1;
  return *ptr;
}
int
testrestrict4 ()
{
  *varptr4 = 0;
  *varptr3 = 1;
  return *varptr4;
}


[Bug ipa/65270] issues with merging memory accesses from different code paths

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #26 from Jan Hubicka  ---
I completely missed the discussion concerning restrict. I opened PR65330 with
that testcase.  We can check in the following way:
Index: ipa-icf.c
===
--- ipa-icf.c   (revision 221223)
+++ ipa-icf.c   (working copy)
@@ -359,6 +359,13 @@ sem_item::compare_cgraph_references (
 return return_false_with_msg
 ("references to virtual tables can not be merged");

+  if (is_a  (n1)
+  && POINTER_TYPE_P (TREE_TYPE (n1->decl))
+  && TYPE_RESTRICT (TREE_TYPE (n1->decl))
+!= TYPE_RESTRICT (TREE_TYPE (n2->decl)))
+return return_false_with_msg
+("references have different restirct flags");
+
   if (address && n1->equal_address_to (n2) == 1)
 return true;
   if (!address && n1->semantically_equivalent_p (n2))

but I suppose with strong enough restrict handling, we want to actually walk
the type and match restrict flag in all contained pointers? Shall we track it
in PR65330, too? It is a non-bug until the missed optimization is fixed.


[Bug rtl-optimization/64317] [5 Regression] Ineffective allocation of PIC base register

2015-03-05 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64317

--- Comment #22 from Jeffrey A. Law  ---
Yes, absolutely, we have to compensate for the case where B clobbers something
useful, undoing transformations, etc.  It may not be reasonably feasible within
the current structure of LRA.

I'm getting pretty close on getting postreload-gcse.c to handle this.  Most of
the complexity has been in untangling the bits from gcse.c that I want to
re-use.

There's obviously cleanup still to do and some instrumentation/analysis of the
generated code on a wider codebase, but it looks promising.


[Bug ipa/65270] issues with merging memory accesses from different code paths

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #27 from Jan Hubicka  ---
here is a variant of orignal testcase for tree-tail-merge

struct a 
{
  int a[10];
};
typedef struct a misaligned_t __attribute__ ((aligned (8)));
typedef struct a aligned_t __attribute__ ((aligned (32)));

__attribute__ ((used))
__attribute__ ((noinline))
t(void *a, int misaligned, aligned_t *d)
{
  int i,v;
  for (i=0;i<10;i++)
{
if (misaligned)
  v=((misaligned_t *)a)->a[i];
else
  v=((aligned_t *)a)->a[i];
d->a[i]+=v;
}
}
struct b {int v; misaligned_t m;aligned_t aa;} b;
aligned_t d;
main()
{
  t(&b.m, 1, &d);
}

$ ./xgcc -B ./ -O3 t.c -fdump-tree-all-details  
t.c:10:1: warning: return type defaults to �int� [-Wimplicit-int]
 t(void *a, int misaligned, aligned_t *d)
 ^
t.c:24:1: warning: return type defaults to �int� [-Wimplicit-int]
 main()
 ^
$ ./a.out
Segmentation fault

It works (by accident) for GCC 4.7, so it is a regression again...

[Bug c++/65323] -Wzero-as-null-pointer-constant stutters

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65323

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-03-05
 Ever confirmed|0   |1


[Bug target/65138] testsuite ICEs on powerpc64le

2015-03-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65138

--- Comment #18 from Michael Meissner  ---
Author: meissner
Date: Thu Mar  5 20:31:10 2015
New Revision: 221224

URL: https://gcc.gnu.org/viewcvs?rev=221224&root=gcc&view=rev
Log:
2015-03-03  Michael Meissner  

Backport from trunk
2015-03-03  Michael Meissner  

PR 65138/target
* config/rs6000/rs6000-cpus.def (powerpc64le): Add new generic
processor type for 64-bit little endian PowerPC.

* config/rs6000/rs6000.c (rs6000_option_override_internal): If
-mdebug=reg, print TARGET_DEFAULT.  Fix logic to use
TARGET_DEFAULT if there is no default cpu.  Fix -mdebug=reg
printing built-in mask so it does not pass NULL pointers.

* config/rs6000/rs6000-tables.opt: Regenerate.

* doc/invoke.texi (IBM RS/6000 and PowerPC options): Document
-mcpu=powerpc64le.

Backport from trunk
2015-01-19  David Edelsohn  

* config/rs6000/default64.h: Include rs6000-cpus.def.
(TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).
(TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.
* config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7
and POWER8.
* config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to
POWER8.
* config/rs6000/rs6000.c (rs6000_file_start): Emit .machine
pseudo-op to specify assembler dialect.


Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/rs6000/default64.h
branches/gcc-4_9-branch/gcc/config/rs6000/driver-rs6000.c
branches/gcc-4_9-branch/gcc/config/rs6000/linux64.h
branches/gcc-4_9-branch/gcc/config/rs6000/rs6000-cpus.def
branches/gcc-4_9-branch/gcc/config/rs6000/rs6000-tables.opt
branches/gcc-4_9-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_9-branch/gcc/doc/invoke.texi


[Bug libstdc++/65329] [C++14] constexpr complex::real(), imag() are non-const

2015-03-05 Thread g...@axel-naumann.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65329

--- Comment #2 from Axel Naumann  ---
Thanks Jonathan,

Indeed, that does it. Apologies for not going to the source of it!

Axel.


[Bug middle-end/65330] restrict should be considered when folding through references from global vars

2015-03-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65330

Jan Hubicka  changed:

   What|Removed |Added

   Priority|P3  |P1
 Depends on||65270
   Severity|normal  |enhancement

--- Comment #1 from Jan Hubicka  ---
To make this work, ICF most probably must not merge variables with mismatching
restrict qualifiers.


[Bug rtl-optimization/65321] [5 Regression] ICE on valid code at -O2 and -O3 with -g enabled in decompose, at rtl.h:2007

2015-03-05 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65321

--- Comment #4 from rsandifo at gcc dot gnu.org  
---
(In reply to Richard Biener from comment #3)
> (gdb) p debug_rtx (x.first)
> (const_int 128 [0x80])
> (gdb) p x.second
> $2 = QImode
> (gdb) p precision 
> $3 = 8
> 
> the CONST_INT is not properly sign-extended.  This is from
> 
> #6  0x00d55381 in simplify_const_binary_operation (code=ASHIFT, 
> mode=QImode, op0=0x768d3490, op1=0x769e8b00)
> at /space/rguenther/src/svn/trunk2/gcc/simplify-rtx.c:4001
> ...
> 3997case LSHIFTRT:
> 3998case ASHIFTRT:
> 3999case ASHIFT:
> 4000  {
> 4001wide_int wop1 = pop1;
> 4002if (SHIFT_COUNT_TRUNCATED)
> 4003  wop1 = wi::umod_trunc (wop1, width);
> 
> but of course the shift amount need not be QImode as well.  128 is quite
> large,
> but well...
> 
> Fact is that we don't know the mode of op1 here.  From the fact that the
> const_int is not sign-extended we can conclude its mode is larger than
> QImode.
> And we will truncate it anyway (or return NULL_RTX) if it is too large, so
> it doesn't even matter.

I take your point, but at the same time, is it really worth supporting shifts
whose shift amount is wider than the shifted value?  ISTM that no .md pattern
would want such a thing, so in practice this would only ever happen with debug
exprs.  I think the safest fix would be to make use_narrower_mode{,_test}
narrow the shift amount if it is wider than the target mode.  Just tried that
locally and it seems to fix the test case.

> I think we can simply use
> 
>   wide_int wop1 = std::make_pair (op1, MAX_MODE_INT);
> 
> here (or SImode maybe).  Or have a "don't care" way to make a wide-int
> from a CONST_INT directly.

Certainly SImode would be dangerous, since there's nothing to stop the same bug
reappearing with DImode.  MAX_MODE_INT is a problem because it can be wider
than MAX_BITSIZE_MODE_ANY_INT on targets like x86_64 that explicitly override
the wide_int size.  And I'd be reluctant to relax the general CONST_INT
semantics for such an oddball case.

Thanks,
Richard


[Bug c++/65324] -Wzero-as-null-pointer-constant: incorrect location for function templates

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65324

--- Comment #1 from Paolo Carlini  ---
Weird, I thought we already had this in Bugzilla, where I explained that it
doesn't particularly have to do with this warning, eg,

template 
void fun(T, signed char = 1000.0) {}

int main()
{
  fun(0);
}

Can you please check?


[Bug c++/65323] -Wzero-as-null-pointer-constant stutters

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65323

--- Comment #1 from Paolo Carlini  ---
This one should be easy to fix.


[Bug libstdc++/65329] [C++14] constexpr complex::real(), imag() are non-const

2015-03-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65329

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #3 from Jonathan Wakely  ---
Fixed in 5.0


[Bug c++/52718] -Wzero-as-null-pointer-constant: misleading location for 0 as default argument

2015-03-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52718

--- Comment #21 from Paolo Carlini  ---
*** Bug 65324 has been marked as a duplicate of this bug. ***


  1   2   >