[Bug c/50021] New: -Wsuggest-attribute=pure makes obviously-incorrect suggestion

2011-08-08 Thread eggert at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50021

   Summary: -Wsuggest-attribute=pure makes obviously-incorrect
suggestion
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: egg...@gnu.org


Created attachment 24948
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24948
v.i - input that causes GCC to generate incorrect warning

I ran into this problem when building coreutils (git master) using
GCC 4.6.1, x86-64, on Fedora 14.

For the attached program v.i, "gcc -Wsuggest-attribute=pure -O2 -S v.i" says:

  v.i:3546:1: warning: function might be candidate for attribute 'pure' if it
is known to return normally [-Wsuggest-attribute=pure]

But the function in question is obviously not pure:

  static void
  advance (_Bool f)
  {
++pos;
if (f && pos >= argc)
  beyond ();
  }

as it starts off with a side effect (adding 1 to the static variable 'pos').

Here's the output of "gcc -v -save-temps -Wsuggest-attribute=pure -O2 -S v.i":

  Using built-in specs.
  COLLECT_GCC=gcc
 
COLLECT_LTO_WRAPPER=/home/eggert/opt/Linux-x86_64/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
  Target: x86_64-unknown-linux-gnu
  Configured with: ../gcc-4.6.1/configure
--prefix=/home/eggert/opt/Linux-x86_64/gcc-4.6.1 --disable-nls
  Thread model: posix
  gcc version 4.6.1 (GCC) 
  COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wsuggest-attribute=pure' '-O2' '-S'
'-mtune=generic' '-march=x86-64'
  
/home/eggert/opt/Linux-x86_64/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/cc1
-fpreprocessed v.i -quiet -dumpbase v.i -mtune=generic -march=x86-64 -auxbase v
-O2 -Wsuggest-attribute=pure -version -o v.s
  GNU C (GCC) version 4.6.1 (x86_64-unknown-linux-gnu)
  compiled by GNU C version 4.6.1, GMP version 4.3.1, MPFR version 2.4.2,
MPC version 0.8.1
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  GNU C (GCC) version 4.6.1 (x86_64-unknown-linux-gnu)
  compiled by GNU C version 4.6.1, GMP version 4.3.1, MPFR version 2.4.2,
MPC version 0.8.1
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  Compiler executable checksum: b0a4f47793c670c0e36c6193e4fd175b
  v.i:3546:1: warning: function might be candidate for attribute 'pure' if it
is known to return normally [-Wsuggest-attribute=pure]
 
COMPILER_PATH=/home/eggert/opt/Linux-x86_64/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/:/home/eggert/opt/Linux-x86_64/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/:/home/eggert/opt/Linux-x86_64/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/:/home/eggert/opt/Linux-x86_64/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/:/home/eggert/opt/Linux-x86_64/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/
 
LIBRARY_PATH=/home/eggert/opt/Linux-x86_64/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/:/home/eggert/opt/Linux-x86_64/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/home/eggert/opt/Linux-x86_64/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../:/lib/:/usr/lib/
  COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wsuggest-attribute=pure' '-O2' '-S'
'-mtune=generic' '-march=x86-64'


[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]

2011-08-08 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011

--- Comment #2 from Zdenek Sojka  2011-08-08 07:53:54 
UTC ---
(In reply to comment #1)
> That may be true on your platform, but I don't think it is guaranteed to be
> true in general. I don't know if that explains the warning...

Yes, I should have mentioned the target is x86_64-unknown-linux-gnu.
Generally, the code added in r177215:

+  if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
+   || TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype))

looks like no unsigned type can ever be losslessly converted to a signed type
(even when it's "longer"), which is not true (on the other hand, an unsigned
type can never represent all values of any signed type, because it can't
represent negative numbers). But of course, I am not a language lawyer at all.


[Bug tree-optimization/49963] [4.7 Regression] ICE: in abs_hwi, at hwint.c:108

2011-08-08 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49963

--- Comment #6 from Georg-Johann Lay  2011-08-08 
08:28:46 UTC ---
(In reply to comment #5)
> Created attachment 24909 [details]
> Draft patch
> 
> I'm attaching a patch which tries to implement what Joseph suggests (thanks!).
> Essentially, I'm replacing all uses of abs_hwi outside hwint.c itself, besides
> three in tree-ssa-math-opts.c which seem correct anyway: the argument is an
> HOST_WIDE_INT / 2 or / 3 and the result is passed to a function taking a plain
> HOST_WIDE_INT. Type-wise the patch makes a lot of sense to me.
> 
> Maybe submitter could test it? I'm sanity checking it on x86_64.

That works for me, i.e. gcc.c-torture/execute/divconst-2.c passes with your 
patch.


[Bug c++/50020] [C++0x] internal compiler error range for in templated class

2011-08-08 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50020

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 08:50:23
 CC||jason at gcc dot gnu.org
 Ever Confirmed|0   |1
   Severity|critical|normal


[Bug libstdc++/47762] FAIL: ext/mt_allocator/deallocate_global_thread-1.cc execution test

2011-08-08 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47762

Dominique d'Humieres  changed:

   What|Removed |Added

 Target|i686-apple-darwin9  |(i686|powerpc)-apple-darwin
   ||9
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 09:25:13
 CC||bkoz at redhat dot com,
   ||paolo.carlini at oracle dot
   ||com
   Host|i686-apple-darwin9  |(i686|powerpc)-apple-darwin
   ||9
 Ever Confirmed|0   |1
  Build|i686-apple-darwin9  |(i686|powerpc)-apple-darwin
   ||9

--- Comment #1 from Dominique d'Humieres  2011-08-08 
09:25:13 UTC ---
This PR appeared on ppc between revisions 147909 and 147938 (see
http://gcc.gnu.org/ml/gcc-testresults/2009-05/msg02409.html and
http://gcc.gnu.org/ml/gcc-testresults/2009-05/msg02457.html ) and is likely due
to revision 147937.


[Bug tree-optimization/50005] [4.7 Regression] ipa-inline-analysis.c:1876:41: error: comparison between signed an d unsigned integer expressions

2011-08-08 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50005

--- Comment #3 from Mikael Pettersson  2011-08-08 
09:29:05 UTC ---
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00749.html


[Bug c++/49996] Internal error in verify_gimple_stmt: initializing struct in new-initializer

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49996

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 09:40:44
 Ever Confirmed|0   |1
  Known to fail||4.4.6, 4.5.4, 4.6.1, 4.7.0

--- Comment #1 from Richard Guenther  2011-08-08 
09:40:44 UTC ---
We have an un-gimplified

(gdb) call debug_gimple_stmt (stmt)
<<< Unknown GIMPLE statement: gimple_with_cleanup_expr >>>

{
  struct B * p;

  p.0 = operator new (8);
  try
{
  <<< Unknown GIMPLE statement: gimple_with_cleanup_expr >>>

  MEM[(struct B *)p.0].ref = &D.1863;
}
  catch
{
  operator delete (p.0);
}
  p = p.0;
}
D.1867 = 0;
return D.1867;


Never worked ok.


[Bug tree-optimization/49997] [4.7 Regression] ICE in inline_small_functions with -fnon-call-exceptions

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49997

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 09:43:59
  Known to work||4.6.1
   Target Milestone|--- |4.7.0
Summary|ICE in  |[4.7 Regression] ICE in
   |inline_small_functions with |inline_small_functions with
   |-fnon-call-exceptions   |-fnon-call-exceptions
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-08-08 
09:43:59 UTC ---
Confirmed.


[Bug middle-end/49991] gimple check: expected gimple_phi(error_mark), have gimple_assign(max_expr) in gimple_phi_arg

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49991

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #3 from Richard Guenther  2011-08-08 
09:44:47 UTC ---
I can't reproduce this.  Probably fixed by

2011-08-05  Ira Rosen  

* tree-vect-loop.c (vect_create_epilog_for_reduction): Use the
result of multiple results reduction when extracting the final
value using scalar code.


[Bug other/49998] [4.7 Regression] crtstuff.c:64:28: fatal error: unwind-dw2-fde.h: No such file

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49998

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug tree-optimization/49999] [4.5/graphite] ICE in graphite_loop_normal_form, at graphite-sese-to-poly.c:2850

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #1 from Richard Guenther  2011-08-08 
09:48:07 UTC ---
Fixed then.


[Bug fortran/50004] [4.7 Regression] ICE in c_ptr_tests_16.f90

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50004

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug debug/50006] [4.7 Regression] ICE in in connect_traces, at dwarf2cfi.c:2677

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50006

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug java/50007] org.eclipse.jdt.internal.compiler.batch.GCCMain not found

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50007

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Richard Guenther  2011-08-08 
09:52:17 UTC ---
You need to put ecj.jar somewhere.  Please read GCC install instructions.


[Bug lto/50008] [4.7 Regression] type mismatch in array reference, verify_gimple failed

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50008

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug target/50009] [4.7 Regression] Segmentation fault in tree_nop_conversion

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50009

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 09:57:48
  Component|c   |target
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-08-08 
09:57:48 UTC ---
It seems that the stor-layout code assumes fields have complete types - they
do not, in case of flexible trailing array members.

  if (targetm.ms_bitfield_layout_p (rli->t))
{
  /* Here, the alignment of the underlying type of a bitfield can
 affect the alignment of a record; even a zero-sized field
 can do this.  The alignment should be to the alignment of
 the type, except that for zero-size bitfields this only
 applies if there was an immediately prior, nonzero-size
 bitfield.  (That's the way it is, experimentally.) */
  if ((!is_bitfield && !DECL_PACKED (field))
  || (!integer_zerop (DECL_SIZE (field))

now, the STRIP_NOPS in integer_zerop is odd as well.


[Bug tree-optimization/50005] [4.7 Regression] ipa-inline-analysis.c:1876:41: error: comparison between signed an d unsigned integer expressions

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50005

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #5 from Richard Guenther  2011-08-08 
09:59:18 UTC ---
Fixed.


[Bug tree-optimization/50005] [4.7 Regression] ipa-inline-analysis.c:1876:41: error: comparison between signed an d unsigned integer expressions

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50005

--- Comment #4 from Richard Guenther  2011-08-08 
09:59:05 UTC ---
Author: rguenth
Date: Mon Aug  8 09:59:02 2011
New Revision: 177557

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177557
Log:
2011-08-08  Mikael Pettersson  

PR tree-optimization/50005
* ipa-inline-analysis (remap_predicate): Add cast to
silence signed/unsigned comparison warning.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline-analysis.c


[Bug tree-optimization/50014] [4.7 Regression] Assertion failed in vect_get_vec_def_for_stmt_copy

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50014

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 10:05:16
 CC||irar at gcc dot gnu.org
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-08-08 
10:05:16 UTC ---
Confirmed on x86_64 with -m32 -msse2.  Looks like caused by the
widening pattern matching code.


[Bug bootstrap/50018] [4.7 regression] fixup_args_size_notes ICE breaks m68k-linux bootstrap

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50018

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug bootstrap/49242] Bootstrap comparison failure

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49242

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.08.08 09:59:50
 Ever Confirmed|0   |1


[Bug bootstrap/49246] bootstrap comparison failure with 174455 on OpenBSD

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49246

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.08.08 10:00:05
 Ever Confirmed|0   |1


[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 10:02:27
 Ever Confirmed|0   |1

--- Comment #3 from Richard Guenther  2011-08-08 
10:02:27 UTC ---
+  if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
+   || TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype))

looks wrong.  I guess it should be

  if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
  || (TYPE_PRECISION (type) == TYPE_PRECISION (ftype)
  && TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype)))

instead.


[Bug c++/50012] [4.5/4.6/4.7 Regression] C++ front end misses -Wsign-compare warnings when extraneous parentheses are present

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50012

Richard Guenther  changed:

   What|Removed |Added

   Keywords||diagnostic
   Target Milestone|--- |4.5.4
Summary|C++ front end misses|[4.5/4.6/4.7 Regression]
   |-Wsign-compare warnings |C++ front end misses
   |when extraneous parentheses |-Wsign-compare warnings
   |are present |when extraneous parentheses
   ||are present


[Bug target/49987] [4.7 Regression] gcc.c-torture/compile/pr34856.c fails on powerpc-darwin9 from r176228

2011-08-08 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49987

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.08 10:03:45
 Ever Confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  2011-08-08 
10:03:45 UTC ---
Also

FAIL: gcc.dg/pr34856.c (internal compiler error)
FAIL: gcc.dg/pr34856.c (test for excess errors)


[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]

2011-08-08 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011

--- Comment #4 from Marc Glisse  2011-08-08 
10:12:58 UTC ---
(In reply to comment #2)
> Yes, I should have mentioned the target is x86_64-unknown-linux-gnu.
> Generally, the code added in r177215:
> 
> +  if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
> +   || TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype))
> 
> looks like no unsigned type can ever be losslessly converted to a signed type
> (even when it's "longer"), which is not true (on the other hand, an unsigned
> type can never represent all values of any signed type, because it can't
> represent negative numbers). But of course, I am not a language lawyer at all.

So (if I follow you) g++ is complaining (with a warning, not an error) because
your code is illegal on some other platforms? (I don't think anything forbids
CHAR_BIT==64 and sizeof(long long)==1 in C/C++)


[Bug tree-optimization/50021] -Wsuggest-attribute=pure makes obviously-incorrect suggestion

2011-08-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50021

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Keywords||diagnostic, wrong-code
   Last reconfirmed||2011.08.08 10:12:05
  Component|c   |tree-optimization
 CC||hubicka at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-08-08 
10:12:05 UTC ---
Confirmed.  We suggest 'pure' for the head of the function which was split
by partial inlining.  With -fno-partial-inlining the suggestion is gone.

Honza - we need to make sure to never suggest attributes for clones
(or heads of functions which I guess we are not representing as clone?).

The bug is really bad - and I'd rate this "diagnostic issue" as wrong-code,
as that is what we suggest.


[Bug target/50022] New: [4.7 regression] "incorrect condition in IT block" when building mozilla code base for ARM

2011-08-08 Thread mh+gcc at glandium dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50022

   Summary: [4.7 regression] "incorrect condition in IT block"
when building mozilla code base for ARM
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mh+...@glandium.org


Taking the attached preprocessed file, the following fails with latest gcc
snapshot (4.7-20110806):
$ g++ -std=gnu++0x -o test.o -c nsCookieService.i -mthumb -O3 -march=armv7-a
-mfloat-abi=softfp
/tmp/ccxA5O8X.s: Assembler messages:
/tmp/ccxA5O8X.s:2694: Error: incorrect condition in IT block -- `ldrdlt
r2,[r3]'
/tmp/ccxA5O8X.s:2695: Error: thumb conditional instruction should be in IT
block -- `smullge r2,r3,r3,r2'

The error is slightly different when adding -fomit-frame-pointer:
/tmp/ccSzGgKB.s: Assembler messages:
/tmp/ccSzGgKB.s:2702: Error: thumb conditional instruction should be in IT
block -- `ldrdlt r2,[r3]'


[Bug fortran/49993] arrays declared as parameter are not allocated in read-only memory

2011-08-08 Thread arnaud02 at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49993

--- Comment #1 from Arnaud Desitter  
2011-08-08 10:28:27 UTC ---
The equivalent "C" program results in the expected "segmentation fault".

void a1(int *ia) {
  *ia = 1;
}
void a2(void) {
  static const int ia[] = { 2 };
  a1(ia);
}
int main(void) {
  a2();
  return 0;
}


[Bug target/50022] [4.7 regression] "incorrect condition in IT block" when building mozilla code base for ARM

2011-08-08 Thread mh+gcc at glandium dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50022

--- Comment #1 from Mike Hommey  2011-08-08 
10:44:27 UTC ---
Created attachment 24949
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24949
nsCookieService.i.xz


[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]

2011-08-08 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011

--- Comment #5 from Zdenek Sojka  2011-08-08 11:03:29 
UTC ---
(In reply to comment #3)
> +  if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
> +   || TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype))
> 
> looks wrong.  I guess it should be
> 
>   if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
>   || (TYPE_PRECISION (type) == TYPE_PRECISION (ftype)
>   && TYPE_UNSIGNED (type) != TYPE_UNSIGNED (ftype)))
> 
> instead.

Wouldn't that allow 'signed short' -> 'unsigned int' conversions?

Maybe
   if ((TYPE_PRECISION (type) < TYPE_PRECISION (ftype)
   || (TYPE_PRECISION (type) == TYPE_PRECISION (ftype)
   && TYPE_SIGNED (type) && TYPE_UNSIGNED (ftype))
   || (TYPE_UNSIGNED (type) && TYPE_SIGNED (ftype))
if it means "converting to a smaller type OR converting an unsigned type to a
signed type of the same precision OR convering signed to unsigned". But then
the condition gets quite complicated I would wonder if there isn't a macro for
that check somewhere... (also, it might be wrong)

Maybe simpler would be to just compare type's and ftype's min/max values, if
there is a simple way do to that. (I don't really have GCC sources by hand)


(In reply to comment #4)
> (In reply to comment #2)
> 
> So (if I follow you) g++ is complaining (with a warning, not an error) because
> your code is illegal on some other platforms? (I don't think anything forbids
> CHAR_BIT==64 and sizeof(long long)==1 in C/C++)

It gives a warning probably because of a mistake in the gcc sources.


[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]

2011-08-08 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011

--- Comment #6 from Marc Glisse  2011-08-08 
11:14:06 UTC ---
(In reply to comment #5)
> It gives a warning probably because of a mistake in the gcc sources.

Or not. In your example, remove short and replace int with long. Now you are
asking for a warning that would be there on x86 but not on x86_64, that doesn't
help write portable code.

Now your suggestion may be right, but I want to stress that it is not obvious.


[Bug tree-optimization/48648] internal compiler error: in translate_clast, at graphite-clast-to-gimple.c:1123

2011-08-08 Thread kilo at stierand dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48648

kiloalphaindia  changed:

   What|Removed |Added

 CC||kilo at stierand dot com

--- Comment #13 from kiloalphaindia  2011-08-08 
11:24:35 UTC ---
It seams like this is not yet merged into 4.6. branch.

gcc version 4.6.2 20110729 (prerelease) (GCC) 

still fails.


[Bug middle-end/49946] Thread jumps confuse loop unrolling

2011-08-08 Thread izamyatin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49946

--- Comment #2 from Igor Zamyatin  2011-08-08 
11:35:32 UTC ---
cunrolli does not handle the loop in the testcase because of the condition "ul
== UL_NO_GROWTH && unr_insns > ninsns" in try_unroll_loop_completely. Meanwhile
may_increase_size is true in tree_unroll_loops_completely.


[Bug libfortran/50016] The fortran program 's io is very slow

2011-08-08 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

Janne Blomqvist  changed:

   What|Removed |Added

 CC||jb at gcc dot gnu.org

--- Comment #6 from Janne Blomqvist  2011-08-08 11:51:34 
UTC ---
Maybe this is MingW specific?

I haven't tested this,  but here goes my guess:

Since in the write loop we're jumping back and forth across the file, the
buffer must be frequently flushed; in libgfortran/io/unix.c (buf_flush) we have
in the trunk and 4.6 branch:

#ifdef _WIN32
  _commit (s->fd);
#endif

If this is some kind of win32 equivalent to fsync(), i.e. commit stuff to disk,
then it's no surprise it's slow?

This code was added to buf_flush() as a response to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44698 .


[Bug libfortran/50016] The fortran program 's io is very slow

2011-08-08 Thread xunxun1982 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

--- Comment #7 from PcX  2011-08-08 12:05:47 UTC 
---
(In reply to comment #6)
> Maybe this is MingW specific?
> 
> I haven't tested this,  but here goes my guess:
> 
> Since in the write loop we're jumping back and forth across the file, the
> buffer must be frequently flushed; in libgfortran/io/unix.c (buf_flush) we 
> have
> in the trunk and 4.6 branch:
> 
> #ifdef _WIN32
>   _commit (s->fd);
> #endif
> 
> If this is some kind of win32 equivalent to fsync(), i.e. commit stuff to 
> disk,
> then it's no surprise it's slow?
> 
> This code was added to buf_flush() as a response to
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44698 .

That sounds reasonable.
So this bug is fixed in the trunk, but haven't been backported to 4.6?


[Bug tree-optimization/50014] [4.7 Regression] Assertion failed in vect_get_vec_def_for_stmt_copy

2011-08-08 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50014

Ira Rosen  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||irar at il dot ibm.com
 AssignedTo|unassigned at gcc dot   |irar at gcc dot gnu.org
   |gnu.org |

--- Comment #2 from Ira Rosen  2011-08-08 12:27:44 UTC 
---
Somehow when getting a copy of a vector operand in reduction we use a dummy
def_type, which causes that we try to make a copy of a constant instead of just
using it. 
I am going to test this patch:

Index: tree-vect-loop.c
===
--- tree-vect-loop.c(revision 177423)
+++ tree-vect-loop.c(working copy)
@@ -4310,7 +4310,7 @@ vectorizable_reduction (gimple stmt, gim
   VEC (tree, heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL, *vect_defs =
NULL;
   VEC (gimple, heap) *phis = NULL;
   int vec_num;
-  tree def0, def1, tem;
+  tree def0, def1, tem, op0, op1 = NULL_TREE;

   /* In case of reduction chain we switch to the first stmt in the chain, but
  we don't update STMT_INFO, since only the last stmt is marked as
reduction
@@ -4767,8 +4767,6 @@ vectorizable_reduction (gimple stmt, gim
   /* Handle uses.  */
   if (j == 0)
 {
-  tree op0, op1 = NULL_TREE;
-
   op0 = ops[!reduc_index];
   if (op_type == ternary_op)
 {
@@ -4798,11 +4796,19 @@ vectorizable_reduction (gimple stmt, gim
 {
   if (!slp_node)
 {
-  enum vect_def_type dt = vect_unknown_def_type; /* Dummy */
-  loop_vec_def0 = vect_get_vec_def_for_stmt_copy (dt,
loop_vec_def0);
+  enum vect_def_type dt;
+  gimple dummy_stmt;
+  tree dummy;
+
+  vect_is_simple_use (ops[!reduc_index], loop_vinfo, NULL,
+  &dummy_stmt, &dummy, &dt);
+  loop_vec_def0 = vect_get_vec_def_for_stmt_copy (dt,
+  loop_vec_def0);
   VEC_replace (tree, vec_oprnds0, 0, loop_vec_def0);
   if (op_type == ternary_op)
 {
+  vect_is_simple_use (op1, loop_vinfo, NULL, &dummy_stmt,
+  &dummy, &dt);
   loop_vec_def1 = vect_get_vec_def_for_stmt_copy (dt,

loop_vec_def1);
   VEC_replace (tree, vec_oprnds1, 0, loop_vec_def1);


[Bug libfortran/50016] The fortran program 's io is very slow

2011-08-08 Thread xunxun1982 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

--- Comment #8 from PcX  2011-08-08 12:35:12 UTC 
---
(In reply to comment #7)
> (In reply to comment #6)
> > Maybe this is MingW specific?
> > 
> > I haven't tested this,  but here goes my guess:
> > 
> > Since in the write loop we're jumping back and forth across the file, the
> > buffer must be frequently flushed; in libgfortran/io/unix.c (buf_flush) we 
> > have
> > in the trunk and 4.6 branch:
> > 
> > #ifdef _WIN32
> >   _commit (s->fd);
> > #endif
> > 
> > If this is some kind of win32 equivalent to fsync(), i.e. commit stuff to 
> > disk,
> > then it's no surprise it's slow?
> > 
> > This code was added to buf_flush() as a response to
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44698 .
> 
> That sounds reasonable.
> So this bug is fixed in the trunk, but haven't been backported to 4.6?

Sorry, I'm wrong.
I think I can try 4.7 to test this.


[Bug libfortran/50016] The fortran program 's io is very slow

2011-08-08 Thread xunxun1982 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

--- Comment #9 from PcX  2011-08-08 12:38:11 UTC 
---
CC list add Kai.


[Bug debug/50006] [4.7 Regression] ICE in in connect_traces, at dwarf2cfi.c:2677

2011-08-08 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50006

--- Comment #1 from John David Anglin  2011-08-08 
13:01:14 UTC ---
(gdb) ignor 1 79
Will ignore next 79 crossings of breakpoint 1.
(gdb) r
Starting program: /home/gnu/gcc/objdir/gcc/gnat1 -gnatwa -quiet -dumpbase
s-os_lib.adb -auxbase-strip s-os_lib.o -O2 -Wextra -Wall -fPIC
-frandom-seed=fixed-seed -g -gnatpg -gnatO s-os_lib.o s-os_lib.adb -o
s-os_lib.s
warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.


Breakpoint 1, execute_dwarf2_frame () at ../../gcc/gcc/dwarf2cfi.c:2677
2677  gcc_assert (!ti->args_size_undefined);
(gdb) bt
#0  execute_dwarf2_frame () at ../../gcc/gcc/dwarf2cfi.c:2677
#1  0x004e62bc in execute_one_pass (pass=0x400092e8)
at ../../gcc/gcc/passes.c:2063
#2  0x004e6600 in execute_pass_list (pass=0x400092e8)
at ../../gcc/gcc/passes.c:2118
#3  0x004e6614 in execute_pass_list (pass=0x4000b200)
at ../../gcc/gcc/passes.c:2119
#4  0x004e6614 in execute_pass_list (pass=0x4000b234)
at ../../gcc/gcc/passes.c:2119
#5  0x007374f8 in tree_rest_of_compilation (fndecl=0x7a543700)
at ../../gcc/gcc/tree-optimize.c:420
#6  0x003e58c8 in cgraph_expand_function (node=0x7ab853c0)
at ../../gcc/gcc/cgraphunit.c:1803
#7  0x003e7264 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1862
#8  0x003e7754 in cgraph_finalize_compilation_unit ()
at ../../gcc/gcc/cgraphunit.c:1310
#9  0x0005cf38 in gnat_write_global_declarations ()
at ../../gcc/gcc/ada/gcc-interface/utils.c:4733
#10 0x005017f0 in toplev_main (argc=0, argv=0x0) at ../../gcc/gcc/toplev.c:564
#11 0x003b1214 in main (argc=0, argv=0x79f59ed0) at ../../gcc/gcc/main.c:36
(gdb) p ti
$1 = (dw_trace_info *) 0x4086a144
(gdb) p *ti
$2 = {head = 0x79f6ad98, beg_row = 0x79f59f30, end_row = 0x79f59f48, 
  beg_true_args_size = 0, end_true_args_size = 0, beg_delay_args_size = 0, 
  end_delay_args_size = 0, eh_head = 0x79f673e8, cfa_store = {offset = -576, 
base_offset = 0, reg = 30, indirect = 0, in_use = 0}, cfa_temp = {
offset = 0, base_offset = 0, reg = 3, indirect = 0, in_use = 0}, 
  regs_saved_in_regs = 0x0, id = 3, switch_sections = 0 '\0', 
  args_size_undefined = 1 '\001'}


[Bug libfortran/50016] The fortran program 's io is very slow

2011-08-08 Thread xunxun1982 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

PcX  changed:

   What|Removed |Added

  Known to fail||4.7.0

--- Comment #10 from PcX  2011-08-08 13:01:58 UTC 
---
I test it using gcc4.7.0 on Win7, and it also takes a very long time.

ps: that works fine on Linux.


[Bug testsuite/50023] New: FAIL: gcc.dg/graphite/id-pr46845.c (test for excess errors)

2011-08-08 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50023

   Summary: FAIL: gcc.dg/graphite/id-pr46845.c (test for excess
errors)
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: domi...@lps.ens.fr
CC: s...@gcc.gnu.org
  Host: powerpc-apple-darwin9
Target: powerpc-apple-darwin9
 Build: powerpc-apple-darwin9


On powerpc-apple-darwin9 gcc.dg/graphite/id-pr46845.c fails with

Excess errors:
/opt/gcc/work/gcc/testsuite/gcc.dg/graphite/id-pr46845.c:7:1: warning: GCC
vector returned by reference: non-standard ABI extension with no compatibility
guarantee [enabled by default]
/opt/gcc/work/gcc/testsuite/gcc.dg/graphite/id-pr46845.c:6:1: warning: GCC
vector passed by reference: non-standard ABI extension with no compatibility
guarantee [enabled by default]

On i?86-*-* x86_64-*-* tha warning is disabled by

/* { dg-options "-O2 -ffast-math -fgraphite-identity -w -Wno-psabi" { target {
i?86-*-* x86_64-*-* } } } */

Why not on powerpc?


[Bug debug/50006] [4.7 Regression] ICE in in connect_traces, at dwarf2cfi.c:2677

2011-08-08 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50006

--- Comment #2 from John David Anglin  2011-08-08 
13:25:41 UTC ---
(gdb) p debug_tree (fndecl)
 
unit size 
align 64 symtab 98 alias set 53 canonical type 7aea64e0 fields
 Ada size 
pointer_to_this  chain >
SI
size 
unit size 
align 32 symtab 0 alias set -1 canonical type 7a33a9c0
arg-types 
chain >>
ci/co list  value

chain  value
>>
pointer_to_this >
addressable asm_written static SI file s-os_lib.adb line 775 col 4 align 32
initial  abstract_origin 
arguments 
unit size 
align 8 symtab 0 alias set -1 canonical type 7ae7a840 precision 8
min  max  RM size
 RM max 
pointer_to_this >
readonly used unsigned QI file s-os_lib.adb line 84 col 7 size
 unit size 
align 8 context  abstract_origin 
(reg/v:SI 11 %r11 [orig:128 stdout+-3 ] [128])
arg-type  unit size 
align 32 symtab 1 alias set 2 canonical type 7ade93c0 precision 32
min  max 
pointer_to_this >
incoming-rtl (reg:SI 26 %r26 [ stdout+-3 ])>
result 
used ignored BLK file s-os_lib.adb line 81 col 14 size  unit size 
align 64 context  abstract_origin 
(mem/s/c:BLK (reg/f:SI 5 %r5 [127]) [53 +0 S16 A64])>
struct-function 7a301ea0>
$3 = void


[Bug other/48007] [x32] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-08 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007

--- Comment #5 from hjl at gcc dot gnu.org  2011-08-08 
13:26:10 UTC ---
Author: hjl
Date: Mon Aug  8 13:26:06 2011
New Revision: 177563

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177563
Log:
Fix Dwarf unwind library for UNITS_PER_WORD > sizeof (void *)

gcc/

2011-08-08  H.J. Lu  

PR other/48007
* config.gcc (libgcc_tm_file): Add i386/value-unwind.h for
Linux/x86.

* system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned.
(ASSUME_EXTENDED_UNWIND_CONTEXT): Likewise.

* unwind-dw2.c (ASSUME_EXTENDED_UNWIND_CONTEXT): New.
(_Unwind_Context_Reg_Val): Likewise.
(_Unwind_Get_Unwind_Word): Likewise.
(_Unwind_Get_Unwind_Context_Reg_Val): Likewise.
(_Unwind_Context): Use _Unwind_Context_Reg_Val on the reg field.
(_Unwind_IsExtendedContext): Check ASSUME_EXTENDED_UNWIND_CONTEXT
for EXTENDED_CONTEXT_BIT.
(__frame_state_for): Likewise.
(uw_init_context_1): Likewise.
(_Unwind_GetGR): Updated.
(_Unwind_SetGR): Likewise.
(_Unwind_GetGRPtr): Likewise.
(_Unwind_SetGRPtr): Likewise.
(_Unwind_SetGRValue): Likewise.
(_Unwind_GRByValue): Likewise.
(uw_install_context_1): Likewise.

* doc/tm.texi.in: Document REG_VALUE_IN_UNWIND_CONTEXT and
ASSUME_EXTENDED_UNWIND_CONTEXT.
* doc/tm.texi: Regenerated.

libgcc/

2011-08-08  H.J. Lu  

PR other/48007
* config/i386/value-unwind.h: New.

Added:
trunk/libgcc/config/i386/value-unwind.h
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/doc/tm.texi
trunk/gcc/doc/tm.texi.in
trunk/gcc/system.h
trunk/libgcc/ChangeLog
trunk/libgcc/unwind-dw2.c


[Bug other/48007] [x32] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #6 from H.J. Lu  2011-08-08 13:31:12 
UTC ---
Fixed.


[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781

--- Comment #33 from H.J. Lu  2011-08-08 13:34:47 
UTC ---
(In reply to comment #32)
> (In reply to comment #31)
> > (In reply to comment #29)
> > > Created attachment 24938 [details]
> > > WIP patch that exploits addr32.
> > > 
> > > New version of patch for testing. Survives bootstrap + regtest on
> > > x86_64-pc-linux-gnu.
> > 
> > Oh, I forgot to add MEM_P ..., so please change the condition to:
> > 
> >   if (TARGET_64BIT
> > && MEM_P (x)
> > 
> >   && GET_MODE_SIZE (mode) > UNITS_PER_WORD
> >   && rclass == GENERAL_REGS
> >   && !offsettable_memref_p (x))
> > 
> > Patch still works OK.
> 
> I am testing it now.

It works.  There are no regressions in GCC, glibc and SPEC CPU
2000/2006.  Thanks.


[Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"

2011-08-08 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49948

Georg-Johann Lay  changed:

   What|Removed |Added

 CC||gjl at gcc dot gnu.org

--- Comment #9 from Georg-Johann Lay  2011-08-08 
13:41:19 UTC ---
(In reply to comment #6)
> Author: jakub
> Date: Wed Aug  3 18:49:40 2011
> New Revision: 177291
> 
> Added:
> trunk/gcc/testsuite/gcc.dg/pr49948.c

This causes the following test FAIL:

xgcc: error: unrecognized command line option '-pthread'

compiler exited with status 1
output is:
xgcc: error: unrecognized command line option '-pthread'


FAIL: gcc.dg/pr49948.c (test for excess errors)
Excess errors:
xgcc: error: unrecognized command line option '-pthread'

This is because of
gcc.c:#define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: -pthread}"

Please add
/* { dg-require-effective-target pthread_h } */

or a similar gate to respective test cases.

Thanks,

Johann


[Bug c++/50015] [C++0x] std::initializer_list members are not properly initialized

2011-08-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50015

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #3 from Jason Merrill  2011-08-08 
13:54:30 UTC ---
Yep, same bug.

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


[Bug c++/48370] G++ fails to extend reference temporary lifetime in some situations

2011-08-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48370

Jason Merrill  changed:

   What|Removed |Added

 CC||danny@tu-dortmund.de

--- Comment #1 from Jason Merrill  2011-08-08 
13:54:30 UTC ---
*** Bug 50015 has been marked as a duplicate of this bug. ***


[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]

2011-08-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011

--- Comment #7 from Jason Merrill  2011-08-08 
14:36:27 UTC ---
Author: jason
Date: Mon Aug  8 14:36:22 2011
New Revision: 177565

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177565
Log:
PR c++/50011
* typeck2.c (check_narrowing): Fix integer logic.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck2.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/initlist5.C


[Bug fortran/47659] -Wconversion[-extra] should emit warning for constant expressions

2011-08-08 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47659

--- Comment #5 from Steve Kargl  
2011-08-08 14:50:33 UTC ---
On Mon, Aug 08, 2011 at 06:07:36AM +, thenlich at users dot sourceforge.net
wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47659
> 
> --- Comment #4 from Thomas Henlich  
> 2011-08-08 06:07:33 UTC ---
> It is not safe to omit the warning for integers: the constant could have been
> truncated to an integer, as in:
> 
> real(8) :: r8
> r8 = 12345678.9
> print *, r8
> 
> => 12345679.000

Technically, the above is not a truncation to integer.  The
rhs is rounded.


[Bug c++/50020] [C++0x] internal compiler error range for in templated class

2011-08-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50020

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |


[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781

--- Comment #34 from uros at gcc dot gnu.org 2011-08-08 14:59:22 UTC ---
Author: uros
Date: Mon Aug  8 14:59:19 2011
New Revision: 177566

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177566
Log:
PR target/49781
* config/i386/i386.c (ix86_decompose_address): Allow zero-extended
SImode addresses.
(ix86_print_operand_address): Handle zero-extended addresses.
(memory_address_length): Add length of addr32 prefix for
zero-extended addresses.
(ix86_secondary_reload): Handle moves to/from double-word general
registers from/to zero-extended addresses.
* config/i386/predicates.md (lea_address_operand): Reject
zero-extended operands.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/predicates.md


[Bug fortran/49993] arrays declared as parameter are not allocated in read-only memory

2011-08-08 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49993

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org 2011-08-08 15:05:10 UTC ---
(In reply to comment #1)
> The equivalent "C" program results in the expected "segmentation fault".
> 
> void a1(int *ia) {
>   *ia = 1;
> }
> void a2(void) {
>   static const int ia[] = { 2 };
>   a1(ia);
> }
> int main(void) {
>   a2();
>   return 0;
> }

The programs aren't equivalent.  You need to change a2 to

void a2(void) {
  static int ia[] = { 2 };
  a1(ia);
}

then the programs are equivalent.


[Bug c++/50020] [C++0x] internal compiler error range for in templated class

2011-08-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50020

--- Comment #1 from Jason Merrill  2011-08-08 
15:32:27 UTC ---
Author: jason
Date: Mon Aug  8 15:32:21 2011
New Revision: 177567

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177567
Log:
PR c++/50020
* semantics.c (finish_call_expr): Don't look at 'this' if we
had an explicit object argument.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/range-for20.C


[Bug middle-end/47727] [x32] Many passes can't handle const symbol when Pmode != ptr_mode

2011-08-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47727

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #13 from H.J. Lu  2011-08-08 15:56:30 
UTC ---
Fixed.


[Bug target/48529] [x32] Testsuite failures

2011-08-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48529

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #11 from H.J. Lu  2011-08-08 15:57:18 
UTC ---
Fixed.


[Bug tree-optimization/49999] [4.5/graphite] ICE in graphite_loop_normal_form, at graphite-sese-to-poly.c:2850

2011-08-08 Thread dirtyepic at gentoo dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4

--- Comment #2 from Ryan Hill  2011-08-08 15:58:33 
UTC ---
ie. no backports for graphite work?


[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781

--- Comment #35 from H.J. Lu  2011-08-08 16:28:58 
UTC ---
It works much better now. But gcc.dg/torture/pr47744-2.c compiled with

-mx32 -O3 -std=gnu99 -ftree-vectorize -funroll-loops

still generates those leal:

leal(%rsi,%r9), %ebp
leal(%r10,%r9), %r12d
leal(%r10,%r9), %r12d


[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781

--- Comment #36 from hjl at gcc dot gnu.org  2011-08-08 
16:33:10 UTC ---
Author: hjl
Date: Mon Aug  8 16:33:06 2011
New Revision: 177569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177569
Log:
Add a testcase for PR target/49781.

2011-08-08  H.J. Lu  

PR target/49781
* gcc.target/i386/pr49781-1.c: New.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr49781-1.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug bootstrap/50018] [4.7 regression] fixup_args_size_notes ICE breaks m68k-linux bootstrap

2011-08-08 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50018

--- Comment #3 from Mikael Pettersson  2011-08-08 
16:57:17 UTC ---
Created attachment 24950
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24950
reduced test case

The test case is simply that a function takes the address of a __thread
variable and passes that to another function:

> cat pr50018.c
/* pr50018.c */

extern void pthread_setspecific(void*);
extern __thread int gomp_tls_data;

void gomp_team_start (void)
{
pthread_setspecific(&gomp_tls_data);
}
> gcc/xgcc -Bgcc -O -S pr50018.c
pr50018.c: In function 'gomp_team_start':
pr50018.c:8:24: internal compiler error: in fixup_args_size_notes, at
expr.c:3571
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
> gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=gcc/xgcc
Target: m68k-unknown-linux
Configured with: /tmp/gcc-4.7-20110806/configure --target=m68k-unknown-linux
--prefix=/home/mikpe/pkgs/linux-x86/cross-m68k
--with-gmp=/home/mikpe/pkgs/linux-x86/gmp-4.3.2
--with-mpfr=/home/mikpe/pkgs/linux-x86/mpfr-2.4.2
--with-mpc=/home/mikpe/pkgs/linux-x86/mpc-0.8.2 --disable-plugin --disable-lto
--disable-libquadmath --disable-nls --disable-shared --disable-libmudflap
--disable-multilib --enable-threads=posix --enable-checking=release
--enable-languages=c


[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781

--- Comment #37 from Uros Bizjak  2011-08-08 17:16:44 
UTC ---
(In reply to comment #35)
> It works much better now. But gcc.dg/torture/pr47744-2.c compiled with
> 
> -mx32 -O3 -std=gnu99 -ftree-vectorize -funroll-loops
> 
> still generates those leal:
> 
> leal(%rsi,%r9), %ebp
> leal(%r10,%r9), %r12d
> leal(%r10,%r9), %r12d

This partial address won't combine due to multiple uses.

IIRC, there was some discussion to distribute partial addresses back to their
use sites, but OTOH it all depends on how hard you want to hammer your address
generation unit.


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #5 from Jack Howarth  2011-08-08 
17:45:03 UTC ---
We seem to have...


/* Given a partial pathname as input, return another pathname that
   shares no directory elements with the pathname of __FILE__.  This
   is used by fancy_abort() to print `Internal compiler error in expr.c'
   instead of `Internal compiler error in ../../GCC/gcc/expr.c'.  This
   version is meant to be used for the gen* programs and therefor need not
   handle subdirectories.  */

const char *
trim_filename (const char *name)
{
  static const char this_file[] = __FILE__;
  const char *p = name, *q = this_file;

  /* Skip any parts the two filenames have in common.  */
  while (*p == *q && *p != 0 && *q != 0)
p++, q++;

  /* Now go backwards until the previous directory separator.  */
  while (p > name && !IS_DIR_SEPARATOR (p[-1]))
p--;

  return p;
}

in errors.c and...


/* Given a partial pathname as input, return another pathname that
   shares no directory elements with the pathname of __FILE__.  This
   is used by fancy_abort() to print `Internal compiler error in expr.c'
   instead of `Internal compiler error in ../../GCC/gcc/expr.c'.  */

const char *
trim_filename (const char *name)
{
  static const char this_file[] = __FILE__;
  const char *p = name, *q = this_file;

  /* First skip any "../" in each filename.  This allows us to give a proper
 reference to a file in a subdirectory.  */
  while (p[0] == '.' && p[1] == '.' && IS_DIR_SEPARATOR (p[2]))
p += 3;

  while (q[0] == '.' && q[1] == '.' && IS_DIR_SEPARATOR (q[2]))
q += 3;

  /* Now skip any parts the two filenames have in common.  */
  while (*p == *q && *p != 0 && *q != 0)
p++, q++;

  /* Now go backwards until the previous directory separator.  */
  while (p > name && !IS_DIR_SEPARATOR (p[-1]))
p--;

  return p;
}

in diagnostic.c. Shouldn't we either rename one of these trim_filename
subroutines or unify on a single trim_filename subroutine that is always called
from libcommon.a?


[Bug middle-end/49923] __attribute__((packed)) on ARM is sometimes dropped

2011-08-08 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49923

--- Comment #9 from Martin Jambor  2011-08-08 
17:53:57 UTC ---
Author: jamborm
Date: Mon Aug  8 17:53:55 2011
New Revision: 177572

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177572
Log:
2011-08-08  Martin Jambor  

PR middle-end/49923
* tree-sra.c (access_precludes_ipa_sra_p): Also check access
memory alignment.

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


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr49923.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-sra.c


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #6 from Iain Sandoe  2011-08-08 17:57:06 
UTC ---
Created attachment 24951
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24951
make errors.c match core-diagnostic.c in the shared interfaces

OK. So Darwin's ld is telling the truth - the routine does exist in both
errors.o and the libcommon.a.

I guess, the issue is that (a) the implementations are subtly different, and
(b) there could be causes that would get core-diagnostic.o and errors.o both
included (e.g. a reference to fatal_error).

I'm testing out the attached patch on i686-linux, x86-64-linux and
*-darwin{9,10}.

What is _not_ obvious to me is why x86_64-darwin{10,11} is bitten by this, but
*-darwin9 and linux are not.

===

the patch makes the errors.c interface match the core-diagnostic.c ones (and
more rigorously checks that the relevant headers are included on
GENERATOR_FILE).

of course, I'm not terribly familiar with the generator programs - there could
be some excellent reason that errors.c:fatal () is declared differently from
core-diagnostics.c:fatal_error ().


[Bug c++/50020] [C++0x] internal compiler error range for in templated class

2011-08-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50020

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.0

--- Comment #2 from Jason Merrill  2011-08-08 
18:08:54 UTC ---
Fixed.


[Bug c++/50011] [C++0x] warning: narrowing conversion of 'i' from 'short unsigned int' to 'int' inside { } [-Wnarrowing]

2011-08-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50011

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.0

--- Comment #8 from Jason Merrill  2011-08-08 
18:09:13 UTC ---
Fixed.


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #7 from Dominique d'Humieres  2011-08-08 
18:12:34 UTC ---
> Apparently the key is "--enable-checking=something".

It is even more subtle (x86_64-apple-darwin10):

../work/configure --prefix=/opt/gcc/gcc4.7w
--enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/opt/sw64
--with-libiconv-prefix=/opt/sw64 --with-system-zlib --with-cloog=/opt/sw64
--enable-cloog-backend=isl --enable-checking=none

fails, while

../work/configure --prefix=/opt/gcc/gcc4.7w
--enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/opt/sw64
--with-libiconv-prefix=/opt/sw64 --with-system-zlib --with-cloog=/opt/sw64
--enable-cloog-backend=isl --enable-checking=yes

succeeds. This for bootstraps wthout lto enabled:

[macbook] f90/bug% gfc pr49638_2.f90 -flto
f951: error: LTO support has not been enabled in this configuration


[Bug middle-end/49990] Regression: Bootstrap failure for x86_64-*-mingw32 in libfortran

2011-08-08 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49990

--- Comment #3 from Kai Tietz  2011-08-08 18:19:20 
UTC ---
Author: ktietz
Date: Mon Aug  8 18:19:17 2011
New Revision: 177573

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177573
Log:
2011-08-08  Richard Henderson  

PR middle-end/49990
* config/i386/i386.c (ix86_expand_prologue): Call
for SEH target gen_prologue_use instead of gen_blockage
at prologue's end.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c


[Bug middle-end/49990] Regression: Bootstrap failure for x86_64-*-mingw32 in libfortran

2011-08-08 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49990

Kai Tietz  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Kai Tietz  2011-08-08 18:22:30 
UTC ---
Applied at revision 177573 after approval from Richard Henderson on IRC. 
Fixed.


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #8 from Iain Sandoe  2011-08-08 18:22:38 
UTC ---
(In reply to comment #7)
> > Apparently the key is "--enable-checking=something".
> 
> It is even more subtle (x86_64-apple-darwin10):
> 
> ../work/configure --prefix=/opt/gcc/gcc4.7w
> --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/opt/sw64
> --with-libiconv-prefix=/opt/sw64 --with-system-zlib --with-cloog=/opt/sw64
> --enable-cloog-backend=isl --enable-checking=none
> 
> fails, while
> 
> ../work/configure --prefix=/opt/gcc/gcc4.7w
> --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/opt/sw64
> --with-libiconv-prefix=/opt/sw64 --with-system-zlib --with-cloog=/opt/sw64
> --enable-cloog-backend=isl --enable-checking=yes
> 
> succeeds. This for bootstraps wthout lto enabled:
> 
> [macbook] f90/bug% gfc pr49638_2.f90 -flto
> f951: error: LTO support has not been enabled in this configuration

the with/without checking will alter the usage of diagnostic routines.  

It doesn't seem to me to have much to do with lto - it seems a build issue. 
I.E. one should not be including two different implementations of  the
diagnostics on the same link line.


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #9 from Dominique d'Humieres  2011-08-08 
18:31:02 UTC ---
> It doesn't seem to me to have much to do with lto - it seems a build issue. 
> I.E. one should not be including two different implementations of  the
> diagnostics on the same link line.

I agree!-) 

BTW your patch in comment #6 does not solve the problem with the configure in
comment #4
(with --enable-checking=release).


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #10 from Jack Howarth  2011-08-08 
19:27:58 UTC ---
This is radar://6320843 "duplicate symbols from static libraries not properly
ignored" revisiting us...

26-Oct-2008 10:43 AM Jack Howarth:
Xcode 3.2 fails to link cc1plus-dummy from gcc 4.3.2 due to a reappearance of
radar 5808800//5779681 which was appeared and was fixed during the Xcode 3.1
development cycle. The bug causes the following link failure while building FSF
gcc 4.3.2...

etc.

Their response was...

06-Nov-2008 03:04 PM KIT CHEUNG :
Engineering has requested the following information in order to further
investigate this issue:

How was libbackend.a created?  Its table of contents is wrong because it
contains entries for tentative definitions.  

We ran ranlib on libbackend.a then bad_link_command succeeded.  

If you run:
   ranlib -c libbackend.a
then bad_link_command fails again.   

So my guess is that the build used the -c option when creating libbackend.a. 
Is there a reason for this? 

Darwin static archives traditionally do not have common symbols in there table
of contents.  The -c option forces common symbols into the table of contents
and causes this problem.


[Bug spam/50000] 50k get!!! GCC is great!

2011-08-08 Thread fang at csl dot cornell.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5

David Fang  changed:

   What|Removed |Added

 CC||fang at csl dot cornell.edu

--- Comment #2 from David Fang  2011-08-08 
19:59:01 UTC ---
dup of PR 3?


[Bug c++/50024] New: gcc crashes when using braced initialization in member function of template

2011-08-08 Thread stiffy2 at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50024

   Summary: gcc crashes when using braced initialization in member
function of template
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: stif...@gmx.de


When compiling the example code below, gcc version 4.7.0 20110725
(experimental) crashes, if the -std=c++0x flag is supplied.


Source:

template< class T >
struct Container
{
Container(){
int* ptr = new int{}; // crash ahead
}
};

int main() {
Container< int > c;
}


Call to gcc and error message:

g++ -std=c++0xtemplate_error.cpp   -o template_error
template_error.cpp: In member function `void Container::foo()':
template_error.cpp:16:40: internal compiler error: in cxx_eval_bare_aggregate,
at cp/semantics.c:6601

gcc Version:

% LANG=C g++ -v
Using built-in specs.
COLLECT_GCC=/home/evnu/bin/g++
COLLECT_LTO_WRAPPER=/home/evnu/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --enable-plugin --enable-cloog-backend=isl
--with-ppl --enable-__cxa_atexit --with-system-zlib --enable-shared
--enable-threads=posix --enable-languages=c,c++ --disable-multilib
--prefix=/home/evnu
Thread model: posix
gcc version 4.7.0 20110725 (experimental) (GCC)


Note:
The example compiles if Container is not a template class.


[Bug tree-optimization/50021] -Wsuggest-attribute=pure makes obviously-incorrect suggestion

2011-08-08 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50021

--- Comment #2 from Jan Hubicka  2011-08-08 
20:48:51 UTC ---
Yep, we need to mark partial clones and supress warnings there. Do we have way
to work out from DECL if it is a clone? (from callgraph it is bit tricky in
this case when it comes to ltrans partitioning. For sure I can stick flag there
through)

Honza


[Bug c++/50025] New: C++0x initialization syntax doesn't work for class members of reference type

2011-08-08 Thread akrzemi1 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50025

   Summary: C++0x initialization syntax doesn't work for class
members of reference type
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: akrze...@gmail.com


The following code does not compile although I expect it to:

/// BEGIN CODE ///
#include 

struct S {};

struct C {
  S &  mc2;
  S && mc3;
  C( S& b, S && c ) :  mc2{b}, mc3{std::move(c)} {}
};

int main() { return 0; }
/// END CODE ///

I compile it with command:
g++ test.cpp -std=c++0x -o test.exe

The output is:
test.cpp: In constructor ‘C::C(S&, S&&)’:
test.cpp:9:48: error: invalid initialization of non-const reference of type
‘S&’ from an rvalue of type ‘’
test.cpp:9:48: error: invalid initialization of reference of type ‘S&&’ from
expression of type ‘’

Compiler version (g++ -v):
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch=i686
--build=i686-redhat-linux
Thread model: posix
gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC)


[Bug bootstrap/50018] [4.7 regression] fixup_args_size_notes ICE breaks m68k-linux bootstrap

2011-08-08 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50018

Richard Henderson  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.08.08 21:49:24
 AssignedTo|unassigned at gcc dot   |rth at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #4 from Richard Henderson  2011-08-08 
21:49:24 UTC ---
Mine.


[Bug debug/50006] [4.7 Regression] ICE in in connect_traces, at dwarf2cfi.c:2677

2011-08-08 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50006

Richard Henderson  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.08.08 21:53:04
 AssignedTo|unassigned at gcc dot   |rth at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #3 from Richard Henderson  2011-08-08 
21:53:04 UTC ---
Please do as the bug box says wrt sources.  I don't know how to
cross-debug this sort of Ada thing otherwise.

The ICE appears to be detecting incorrect optimization earlier,
judging by the gdb session in #C1.


[Bug rtl-optimization/49994] [4.7 Regression] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2234 with -fsched2-use-superblocks

2011-08-08 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49994

Richard Henderson  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |rth at gcc dot gnu.org
   |gnu.org |

--- Comment #4 from Richard Henderson  2011-08-08 
21:55:18 UTC ---
Mine.


[Bug debug/50006] [4.7 Regression] ICE in in connect_traces, at dwarf2cfi.c:2677

2011-08-08 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50006

--- Comment #4 from dave.anglin at bell dot net 2011-08-08 22:13:29 UTC ---
Attached bug box sources.  These are from hppa2.0w-hp-hpux11.00.

Dave
--
John David Anglindave.ang...@bell.net


[Bug c++/50025] C++0x initialization syntax doesn't work for class members of reference type

2011-08-08 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50025

--- Comment #1 from Jonathan Wakely  2011-08-08 
22:29:08 UTC ---
G++ is actually correct according to wording in the C++11 FDIS (see 8.5.4
paragraphs 5 and 6), but we've reported it as an issue that needs to be fixed.


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #11 from Iain Sandoe  2011-08-08 22:39:31 
UTC ---
(In reply to comment #9)
> > It doesn't seem to me to have much to do with lto - it seems a build issue. 
> > I.E. one should not be including two different implementations of  the
> > diagnostics on the same link line.
> 
> I agree!-) 
> 
> BTW your patch in comment #6 does not solve the problem with the configure in
> comment #4
> (with --enable-checking=release).

this just completed for me:

/GCC/gcc-live-trunk/configure --prefix=/GCC/gcc-4-7-install
--target=x86_64-apple-darwin10 --host=x86_64-apple-darwin10
--build=x86_64-apple-darwin10 --enable-version-specific-runtime-libs
--enable-threads --enable-checking=release --program-suffix=-4.7tnk
--with-libiconv-prefix=/usr --with-system-zlib
--with-gmp=/GCC/multiprec-math/x86_64 --with-mpfr=/GCC/multiprec-math/x86_64
--with-mpc=/GCC/multiprec-math/x86_64
--enable-languages=c,c++,fortran,objc,lto,obj-c++ --enable-lto --enable-objc-gc


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #12 from Iain Sandoe  2011-08-08 22:41:32 
UTC ---
(In reply to comment #10)
> This is radar://6320843 "duplicate symbols from static libraries not properly
> ignored" revisiting us...

hm I doubt it.  
Check the Makefiles for darwin11 - but, on x86_64-darwin10,  RANLIB is "ranlib"
without the "-c".


[Bug c++/50025] C++0x initialization syntax doesn't work for class members of reference type

2011-08-08 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50025

--- Comment #2 from Jonathan Wakely  2011-08-08 
22:46:31 UTC ---
It's not just class members, it applies to list-initialization of any reference
type:

  int i;
  int& ir{ i }; 

The FDIS requires a temporary to be created, and a non-const reference cannot
bind to a temporary.


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #13 from Jack Howarth  2011-08-08 
22:59:56 UTC ---
(In reply to comment #12)
> (In reply to comment #10)
> > This is radar://6320843 "duplicate symbols from static libraries not 
> > properly
> > ignored" revisiting us...
> 
> hm I doubt it.  
> Check the Makefiles for darwin11 - but, on x86_64-darwin10,  RANLIB is 
> "ranlib"
> without the "-c".

It would still be a form of the problem regardless of whether -c is involved. A
normal unix linker should ignore the symbols from a static library in favor of
those from the object files. This obviously still isn't the case under darwin'c
current linker.


[Bug debug/50006] [4.7 Regression] ICE in in connect_traces, at dwarf2cfi.c:2677

2011-08-08 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50006

--- Comment #5 from dave.anglin at bell dot net 2011-08-08 23:06:08 UTC ---
On 8-Aug-11, at 6:37 PM, danglin at gcc dot gnu.org wrote:

Let's try this again.

--
John David Anglindave.ang...@bell.net


[Bug middle-end/49990] Regression: Bootstrap failure for x86_64-*-mingw32 in libfortran

2011-08-08 Thread vmakarov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49990

--- Comment #5 from Vladimir Makarov  2011-08-08 
23:18:25 UTC ---
Author: vmakarov
Date: Mon Aug  8 23:18:23 2011
New Revision: 177575

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177575
Log:
2011-08-08  Vladimir Makarov  

PR rtl-optimization/49990
* ira-costs.c (print_allocno_costs, print_pseudo_costs): Don't
ignore classes which can not change mode.
(find_costs_and_classes): Ditto.


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


[Bug c++/50025] C++0x initialization syntax doesn't work for class members of reference type

2011-08-08 Thread akrzemi1 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50025

--- Comment #3 from Andrzej Krzemienski  2011-08-08 
23:31:37 UTC ---
(In reply to comment #1)
> G++ is actually correct according to wording in the C++11 FDIS (see 8.5.4
> paragraphs 5 and 6), but we've reported it as an issue that needs to be fixed.

Are you sure about the paragraphs 5 and 6? (5 starts with "An object of type",
6 starts with "The lifetime of the array"?) They only say how
std::initializer_list is created and how it behaves, but the 6th bullet of
paragraph 3 (the one starting with "Otherwise, if the initializer list has a
single element") does not require that std::initializer_list is created or
used. It simply says that in code like:
  int i = 0;
  int & ri{i};

"ri" is initialized with "i". (And BTW, this example works on the same
compiler.)


[Bug middle-end/49937] [4.7 Regression] g++.dg/tree-ssa/fwprop-align.C

2011-08-08 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49937

Hans-Peter Nilsson  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #1 from Hans-Peter Nilsson  2011-08-09 
00:05:00 UTC ---
I'm going out on a limb and CC the author of the most suspect patch, r176508,
in the svn range, r176507:176524, where g++.dg/tree-ssa/fwprop-align.C was
"reintroduced" as a regression for cris-elf.  Will confirm with triaging.


[Bug lto/49992] lto-bootstrap reveals duplicate symbols on x86_64-apple-darwin11

2011-08-08 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

--- Comment #14 from Jack Howarth  2011-08-09 
00:09:08 UTC ---
Iain,
   I would also add that when I was trying avoid having to resort to
http://gcc.gnu.org/ml/gcc-patches/2009-08/msg01583.html, I found that the
linker bug, where duplicate symbols in static libraries weren't properly
ignored, appeared to require a specific set of object files to trigger. I
believe you will find that if you attempt to extract a reduced test case from
just the declarations of trim_filename in errors.c and diagnostics.c, with one
in a static lib, you won't be able to trigger the problem.


[Bug bootstrap/49246] bootstrap comparison failure with 174455 on OpenBSD

2011-08-08 Thread jsg at openbsd dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49246

--- Comment #2 from Jonathan Gray  2011-08-09 00:16:20 
UTC ---
I was still seeing it about a week or so ago.  At the moment I can't even get
past stage1 however.  Something seems to go into an infinite loop around

stage 1 in i386-unknown-openbsd5.0/libstdc++-v3
...
checking for compiler with PCH support..

ps shows:

/home/jsg/src/obj/./gcc/cc1plus -quiet -nostdinc++ -iprefix
/home/jsg/src/obj/gc
c/../lib/gcc/i386-unknown-openbsd5.0/4.7.0/ -isystem
/home/jsg/src/obj/./gcc/inc
lude -isystem /home/jsg/src/obj/./gcc/include-fixed -isystem
/usr/gcc/i386-unkno
wn-openbsd5.0/include -isystem /usr/gcc/i386-unknown-openbsd5.0/sys-include
conf
test.cc -quiet -dumpbase conftest.cc -mtune=i386 -march=i386 -auxbase conftest
-
g -O2 -Werror -Winvalid-pch -Wno-deprecated -o /tmp//ccerRyjL.s

strangely this seems to still happen with --disable-pch and
--enable-languages=c


[Bug middle-end/49500] [4.7 Regression]: gcc.dg/tls/alias-1.c

2011-08-08 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49500

Hans-Peter Nilsson  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #16 from Hans-Peter Nilsson  2011-08-09 
00:15:29 UTC ---
I can confirm that it's fixed for cris-elf and since everyone else already
successfully tested the patch, I'm closing this PR.


[Bug c++/50024] [C++0x] [4.7 Regression] crash when using braced initialization in member function of template

2011-08-08 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50024

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.08.09 00:34:43
 CC||jason at gcc dot gnu.org
Summary|[C++0x] crash when using|[C++0x] [4.7 Regression]
   |braced initialization in|crash when using braced
   |member function of template |initialization in member
   ||function of template
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2011-08-09 
00:34:43 UTC ---
4_6 rejects it without ICEing, thus arguably it's a regression.


[Bug web/49935] Upgrade GCC Bugzilla to 4.0.2

2011-08-08 Thread LpSolit at netscape dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49935

--- Comment #2 from Frédéric Buclin  2011-08-09 
01:47:15 UTC ---
Created attachment 24954
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24954
GCC 4.0.2 patch, v1

Here is the patch which must be applied to the core code of Bugzilla 4.0.2.


[Bug web/49935] Upgrade GCC Bugzilla to 4.0.2

2011-08-08 Thread LpSolit at netscape dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49935

--- Comment #3 from Frédéric Buclin  2011-08-09 
01:48:45 UTC ---
Created attachment 24955
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24955
GCC extension for 4.0.2, v1

And here is the GCC extension updated to work with 4.0.2.

I'm now ready to do the upgrade.


[Bug web/49935] Upgrade GCC Bugzilla to 4.0.2

2011-08-08 Thread LpSolit at netscape dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49935

Frédéric Buclin  changed:

   What|Removed |Added

  Attachment #24954|0   |1
is obsolete||

--- Comment #4 from Frédéric Buclin  2011-08-09 
02:00:34 UTC ---
Created attachment 24956
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24956
GCC 4.0.2 patch, v1.1

Let's define email_morphe() from the extension itself.


[Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code

2011-08-08 Thread jiangning.liu at arm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644

--- Comment #41 from Jiangning Liu  2011-08-09 
02:04:52 UTC ---

> Yes, this is from the libstdc++ sources (4.6.1 20110627,
> libstdc++-v3/libsupc++/new_opnt.cc).  You need a non-EABI ARM variant of GCC
> since this bug manifestation will only show up in the SJLJ version.

I tried and my local patch works on this case. As you can see like below, it is
fixed!

add r0, r0, #12 
bl  _Unwind_SjLj_Unregister
ldr r0, [r7, #8]
mov sp, r7
add sp, sp, #68
@ sp needed for prologue
pop {r2, r3, r4, r5}

Thanks,
-Jiangning


[Bug fortran/45170] [F2003] allocatable character lengths

2011-08-08 Thread damian at rouson dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170

Damian Rouson  changed:

   What|Removed |Added

 CC||damian at rouson dot net

--- Comment #19 from Damian Rouson  2011-08-09 
02:09:56 UTC ---
Comment 9 states that gfortran does not yet support "function result variables
which are character(len=:), pointer".  Presumably this also implies a lack of
support for replacing these with allocatable, deferred-length character
variables.  I'm adding the case below because it produces an ICE with gfortran
4.6.1:

$ cat speaker.F90
module speaker_class
  type speaker
  contains
procedure :: speak
  end type
contains
  function speak(this)
class(speaker) ,intent(in) :: this
character(:) ,allocatable :: speak
  end function
  subroutine say_something(somebody)
class(speaker) :: somebody
print *,somebody%speak()
  end subroutine
end module

$ gfortran -c speaker.F90
speaker.F90: In function 'say_something':
speaker.F90:13:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1906
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

$ gfortran --version
GNU Fortran (GCC) 4.6.1 20110325 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING


[Bug web/49935] Upgrade GCC Bugzilla to 4.0.2

2011-08-08 Thread LpSolit at netscape dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49935

Frédéric Buclin  changed:

   What|Removed |Added

  Attachment #24955|0   |1
is obsolete||

--- Comment #5 from Frédéric Buclin  2011-08-09 
02:12:05 UTC ---
Created attachment 24957
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24957
GCC extension for 4.0.2, v1.1

Minor cleanup


  1   2   >