[Bug middle-end/51663] Desirable/undesirable elimination of unused variables & functions at -O0, -O0 -flto and -O0 -fwhole-program

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663

--- Comment #9 from Richard Guenther  2012-03-26 
07:05:58 UTC ---
(In reply to comment #8)
> The inconsistency should be solved. The question however is what kind of
> behaviour we want at -O0 from LTO.
> 
> It seems to me that at -O0 the LTO/non-LTO output should be as close as
> possible and thus LTO should not privatize symbols and break more silly
> debuggers/tools (this is especially important for SLIM mode).
> 
> We still do renaming of statics and other nasty things, but we should not do
> more than neccesary.
> 
> On the the other hand, I think -fwhole-program should still do privatization.
> This patch implements it.  In addition to this it drops more unobvious
> transformation from -fwhole-program where we bring local COMDAT virtual tables
> and functions w/o address taken since we know duplicating them does not hurt.
> 
> Does this look sane?

Yes.  I think for -O0 -flto we should default to 1:1 partitioning and
_not_ do the renaming of local symbols though ... of course -O0 -flto
does not make too much sense?

> Honza
> 
> Index: ipa.c
> ===
> --- ipa.c   (revision 185777)
> +++ ipa.c   (working copy)
> @@ -616,7 +616,8 @@ cgraph_externally_visible_p (struct cgra
>if (TARGET_DLLIMPORT_DECL_ATTRIBUTES
>&& lookup_attribute ("dllexport", DECL_ATTRIBUTES (node->decl)))
>  return true;
> -  if (node->resolution == LDPR_PREVAILING_DEF_IRONLY)
> +  if (node->resolution == LDPR_PREVAILING_DEF_IRONLY
> +  && optimize)
>  return false;
>/* When doing LTO or whole program, we can bring COMDAT functoins static.
>   This improves code quality and we know we will duplicate them at most
> twice
> @@ -624,11 +625,13 @@ cgraph_externally_visible_p (struct cgra
>implementing same COMDAT)  */
>if ((in_lto_p || whole_program)
>&& DECL_COMDAT (node->decl)
> +  && optimize
>&& cgraph_comdat_can_be_unshared_p (node))
>  return false;
> 
>/* When doing link time optimizations, hidden symbols become local.  */
>if (in_lto_p
> +  && optimize
>&& (DECL_VISIBILITY (node->decl) == VISIBILITY_HIDDEN
>   || DECL_VISIBILITY (node->decl) == VISIBILITY_INTERNAL)
>/* Be sure that node is defined in IR file, not in other object
> @@ -681,7 +684,8 @@ varpool_externally_visible_p (struct var
>   This is needed for i.e. references from asm statements.   */
>if (varpool_used_from_object_file_p (vnode))
>  return true;
> -  if (vnode->resolution == LDPR_PREVAILING_DEF_IRONLY)
> +  if (vnode->resolution == LDPR_PREVAILING_DEF_IRONLY
> +  && optimize)
>  return false;
> 
>/* As a special case, the COMDAT virutal tables can be unshared.
> @@ -690,6 +694,7 @@ varpool_externally_visible_p (struct var
>   is faster for dynamic linking.  Also this match logic hidding vtables
>   from LTO symbol tables.  */
>if ((in_lto_p || flag_whole_program)
> +  && optimize
>&& !vnode->force_output
>&& DECL_COMDAT (vnode->decl) && DECL_VIRTUAL_P (vnode->decl))
>  return false;


[Bug tree-optimization/52705] Loop optimization failure with -O2 versus -O1

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52705

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #2 from Richard Guenther  2012-03-26 
07:07:02 UTC ---
This is invalid.


[Bug target/52717] thunk referenced in discarded section when building samba with -flto

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52717

Richard Guenther  changed:

   What|Removed |Added

   Keywords||lto
 Target||sparc-*-linux
 CC||ebotcazou at gcc dot
   ||gnu.org, hubicka at gcc dot
   ||gnu.org
  Component|middle-end  |target

--- Comment #1 from Richard Guenther  2012-03-26 
08:13:03 UTC ---
Which binutils version are you using?  The symbol seems to be one that is
supposed to be provided by libgcc (see sparc.c:get_pc_thunk_name, used
by GOT register loading)

That stuff might simply not be set up properly for LTO (it does not seem
to be integrated with the cgraph).  Honza?  Eric?


[Bug rtl-optimization/52715] [4.8 Regression] ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7140 with -fselective-scheduling2 -funroll-loops --param=max-average-unrolled-insns=406

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52715

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.8.0


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

2012-03-26 Thread akim.demaille at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52718

 Bug #: 52718
   Summary: -Wzero-as-null-pointer-constant: misleading location
for 0 as default argument
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: akim.demai...@gmail.com


Created attachment 26990
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26990
0 instead of nullptr as default argument

I don't think this is a duplicated of 51196.

In the following example, the locations about the uses of 0
instead of nullptr are misleading: none point to the real
issue, but they point to where the default argument was used.

$ g++-mp-4.8 -Wzero-as-null-pointer-constant -c /tmp/foo.cc
/tmp/foo.cc: In constructor 'bar::bar()':
/tmp/foo.cc:10:9: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
/tmp/foo.cc: At global scope:
/tmp/foo.cc:15:27: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
/tmp/foo.cc:16:22: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]

$ g++-mp-4.8 --version
g++-mp-4.8 (GCC) 4.8.0 20120318 (experimental)
Copyright (C) 2012 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.


[Bug c/52708] suboptimal code with __builtin_constant_p

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52708

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-03-26
 Ever Confirmed|0   |1

--- Comment #2 from Richard Guenther  2012-03-26 
08:17:39 UTC ---
Hm.  We delay evaluating __builtin_constant_p to make it possible for inlining
to lead to simplifications that result in a constant.  We could of course
evaluate early if there are any side-effects in its argument, but that would
change outcome in existing code bases.

What do you think specifies the behavior you are expecting?  Nothing
explicitely
says that the argument is not evaluated or that its side-effects are discarded.


[Bug middle-end/52691] [4.7/4.8 Regression] va_start to builtin_next_arg optimization lost

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52691

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
Version|tree-ssa|4.7.0
   Last reconfirmed||2012-03-26
  Component|c   |middle-end
 CC||meissner at gcc dot gnu.org
 Ever Confirmed|0   |1
Summary|va_start to |[4.7/4.8 Regression]
   |builtin_next_arg|va_start to
   |optimization lost   |builtin_next_arg
   ||optimization lost
   Target Milestone|--- |4.7.1

--- Comment #1 from Richard Guenther  2012-03-26 
08:23:05 UTC ---
Confirmed.  Michael, can you please fix trunk and the 4.7 branch?  Thx.


[Bug target/52717] thunk referenced in discarded section when building samba with -flto

2012-03-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52717

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-03-26
 AssignedTo|unassigned at gcc dot   |ebotcazou at gcc dot
   |gnu.org |gnu.org
 Ever Confirmed|0   |1
   Severity|major   |normal

--- Comment #2 from Eric Botcazou  2012-03-26 
08:23:36 UTC ---
> That stuff might simply not be set up properly for LTO (it does not seem
> to be integrated with the cgraph).  Honza?  Eric?

Yes, that's very likely the source of the problem.


[Bug lto/52687] [LTO] undefined vtable in dynamic library

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52687

--- Comment #1 from Richard Guenther  2012-03-26 
08:27:11 UTC ---
Seems to work for me.


[Bug libstdc++/52719] New: C++11 std::regex is broken compiling simple regular expressions

2012-03-26 Thread rleigh at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52719

 Bug #: 52719
   Summary: C++11 std::regex is broken compiling simple regular
expressions
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rle...@debian.org


Created attachment 26991
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26991
Working code using boost::regex

This is reproducible with both GCC 4.6 and 4.7.

Simple expressions such as "^[^:/,.][^:/,]*$" result in a regex_error exception
being thrown.  The exception what() method returns only "regex_error", rather
than any informative message.  The code previously used boost::regex, which
worked perfectly well.  The same regex also works with grep.

I've attached:
- working boost code
- failing std::regex code
- compiler info
- g++ -E output

The gdb backtrace is as follows:

% gdb testr
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/rleigh/schroot/testr...(no debugging symbols
found)...done.
(gdb) catch throw
Function "__cxa_throw" not defined.
Catchpoint 1 (throw)
(gdb) run
Starting program: /home/rleigh/schroot/testr
Catchpoint 1 (exception thrown), 0x00319f862800 in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00319f862800 in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00319f8b5a9d in
std::__throw_regex_error(std::regex_constants::error_type) () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00408bac in std::__regex::_Compiler >::_M_bracket_expression() ()
#3  0x00407db3 in std::__regex::_Compiler >::_M_atom() ()
#4  0x00406db5 in std::__regex::_Compiler >::_M_term() ()
#5  0x00405a28 in std::__regex::_Compiler >::_M_alternative() ()
#6  0x00405a72 in std::__regex::_Compiler >::_M_alternative() ()
#7  0x00404d38 in std::__regex::_Compiler >::_M_disjunction() ()
#8  0x004042ed in std::__regex::_Compiler >::_Compiler(char const* const&, char const* const&,
std::regex_traits&, unsigned int) ()
#9  0x004037e9 in std::shared_ptr
std::__regex::__compile >(char const*
const&, char const* const&, std::regex_traits&, unsigned int) ()
#10 0x00402e89 in std::basic_regex
>::basic_regex(char const*, unsigned int) ()
#11 0x00401b16 in main ()


[Bug libstdc++/52719] C++11 std::regex is broken compiling simple regular expressions

2012-03-26 Thread rleigh at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52719

--- Comment #1 from Roger Leigh  2012-03-26 08:29:23 
UTC ---
Created attachment 26992
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26992
Failing code using std::regex


[Bug libstdc++/52719] C++11 std::regex is broken compiling simple regular expressions

2012-03-26 Thread rleigh at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52719

--- Comment #2 from Roger Leigh  2012-03-26 08:31:09 
UTC ---
Created attachment 26993
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26993
Preprocessed std::regex source (g++ -E)


[Bug libstdc++/52719] C++11 std::regex is broken compiling simple regular expressions

2012-03-26 Thread rleigh at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52719

--- Comment #3 from Roger Leigh  2012-03-26 08:31:48 
UTC ---
Created attachment 26994
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26994
Machine and compiler specs


[Bug libstdc++/52719] C++11 std::regex is broken compiling simple regular expressions

2012-03-26 Thread rleigh at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52719

--- Comment #4 from Roger Leigh  2012-03-26 08:37:10 
UTC ---
I left the priority as "normal", but if this is generally reproducible, and not
a failure on my part, it would mean that std::regex is quite unusable in its
current form.

Thanks,
Roger


[Bug rtl-optimization/52629] out-of-bounds access in reload1.c

2012-03-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52629

--- Comment #2 from Eric Botcazou  2012-03-26 
08:41:14 UTC ---
Author: ebotcazou
Date: Mon Mar 26 08:41:02 2012
New Revision: 185787

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185787
Log:
PR rtl-optimization/52629
* reload1.c (count_pseudo): Short-circuit common case.
(count_spilled_pseudo): Return early for pseudos without hard regs.
Assert that the pseudo has got a hard reg before manipulating it.

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


[Bug c/52720] New: internal compiler error: in try_move_mult_to_index

2012-03-26 Thread treeve at sourcemage dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52720

 Bug #: 52720
   Summary: internal compiler error: in try_move_mult_to_index
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tre...@sourcemage.org


Created attachment 26995
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26995
preprocessed input file, xz compressed

root@Gemini-64:/usr/src/Mesa-8.0.2/src/gallium/drivers/r600# make
gcc -c -I. -I../../../../src/gallium/include
-I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers
-I../../../../include -march=native -mtune=native -m64 -pipe -O3 -Wall
-Wmissing-prototypes -std=c99 -fno-strict-aliasing -fno-builtin-memcmp
-march=native -mtune=native -m64 -pipe -O3  -fPIC  -DUSE_X86_64_ASM
-D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1
-DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XCB_DRI2
-D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0300 -fvisibility=hidden -save-temps
-I/usr/include-D_GNU_SOURCE   -Wno-unused-parameter -Wwrite-strings 
-Wno-long-long -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS r600_asm.c -o r600_asm.o
gcc: warning: -pipe ignored because -save-temps specified
r600_asm.c: In function 'check_and_set_bank_swizzle':
r600_asm.c:780:12: internal compiler error: in try_move_mult_to_index, at
fold-const.c:6995
Please submit a full bug report,
with preprocessed source if appropriate.



$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /usr/src/gcc-4.7.0/configure --prefix=/usr
--infodir=/usr/share/info --mandir=/usr/share/man --enable-threads=posix
--enable-languages=c,c++ --with-bugurl=http://bugs.sourcemage.org
--enable-bootstrap --enable-checking=release --disable-multilib --without-ppl
--without-cloog --build=x86_64-pc-linux-gnu --with-system-zlib --disable-nls
Thread model: posix
gcc version 4.7.0 (GCC)



Linux-3.3
amd64


[Bug libstdc++/52719] C++11 std::regex is broken compiling simple regular expressions

2012-03-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52719

--- Comment #5 from Jonathan Wakely  2012-03-26 
09:47:12 UTC ---
(In reply to comment #4)
> std::regex is quite unusable in its current form.

And documented as such in
http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011

The whole of Clause 28 is partially supported or not supported at all.


[Bug lto/52687] [LTO] undefined vtable in dynamic library

2012-03-26 Thread dimhen at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52687

--- Comment #2 from Dmitry G. Dyachenko  2012-03-26 
10:07:53 UTC ---
May be issue is Fedora 16 specific?

i update gcc-trunk and retest with gcc-4.8.0/r185790 and with F16 gcc
For gcc-4.8.0 i try -O0/1/2/3/fast and w/o -O  with no differences

[dimhen@dim tst]$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.6.3/lto-wrapper
Target: x86_64-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_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) 

w/o LTO

[dimhen@dim tst]$ rm -f foo.o libfoo.so && g++ -c foo.cpp -o foo.o && g++
-shared foo.o -o libfoo.so && nm -D -C -u libfoo.so foo.o | grep foo
nm: foo.o: No symbols
libfoo.so:
foo.o:

with LTO

[dimhen@dim tst]$ rm -f foo.o libfoo.so && g++ -flto -c foo.cpp -o foo.o && g++
-shared foo.o -flto -o libfoo.so && nm -D -C -u libfoo.so foo.o | grep foo
nm: foo.o: No symbols
libfoo.so:
 U vtable for foo
foo.o:
[dimhen@dim tst]$ uname -a
Linux dim.cp.ru 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64
x86_64 x86_64 GNU/Linux

gcc-4.8.0 with LTO

[dimhen@dim tst]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/dimhen/src/gcc-current/configure
--prefix=/usr/local/gcc_current --with-multilib-list=m64 --enable-__cxa_atexit
--enable-shared --enable-checking=df,fold,rtl,tree,yes
--enable-gnu-unique-object --enable-linker-build-id
--enable-languages=c,c++,lto --enable-plugin --with-tune=generic
--enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.8.0 20120326 (experimental) [trunk revision 185790] (GCC) 
[dimhen@dim tst]$ rm -f foo.o libfoo.so && g++ -flto -c foo.cpp -o foo.o && g++
-shared foo.o -flto -o libfoo.so && nm -D -C -u libfoo.so foo.o | grep foo
nm: foo.o: No symbols
libfoo.so:
 U vtable for foo
foo.o:


[Bug tree-optimization/52721] New: segfault in vect_init_vector

2012-03-26 Thread amodra at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52721

 Bug #: 52721
   Summary: segfault in vect_init_vector
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: amo...@gmail.com


Created attachment 26996
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26996
preprocessed source

gcc.dg/vect/pr22480.c is failing on powerpc-linux due to the call from
tree-vect-stmts.c:3167 passing a non-vector type for vector_type.

compile with cc1 -fpreprocessed pr22480.i -msecure-plt -quiet -dumpbase
pr22480.c -maltivec -mvsx -mno-allow-movmisalign -m32 -auxbase-strip pr22480.s
-O2 -version -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -o
pr22480.s


[Bug c/51294] spurious warning from -Wconversion in C and C++ in conditional expressions

2012-03-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51294

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-03-26
 CC||paolo.carlini at oracle dot
   ||com
 Ever Confirmed|0   |1

--- Comment #8 from Paolo Carlini  2012-03-26 
10:15:11 UTC ---
Manuel, we should really make progress on this. I'll try to work on it, help
welcome.


[Bug c/52600] OpenMP: declaration as structured block

2012-03-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52600

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||rth at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  2012-03-26 
10:17:02 UTC ---
In C++ we accept this, in C we don't (we call c_parser_statement, but
declarations aren't handled by that, due to the allowing/disallowing of mixing
of declarations and statements in C99 vs. C90).
I guess we could move the loop body from c_parser_compound_statement_nostart
to a new function and use it there as well as in c_parser_omp_structured_block,
c_parser_omp_{parallel,task} and c_parser_omp_sections_scope.

It is very ugly to allow there declarations though, that means code behaves
very differently between -fopenmp and -fno-openmp - in the former case the
declared var would go out of scope immediately, in the latter would be around
until closing }.


[Bug tree-optimization/50693] Loop optimization restricted by GOTOs

2012-03-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50693

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #27 from Jakub Jelinek  2012-03-26 
10:23:22 UTC ---
Fixed for 4.7+, won't backport to older branches.


[Bug c/51712] -Wtype-limits should not trigger for types of implementation-defined signedness

2012-03-26 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712

--- Comment #1 from Manuel López-Ibáñez  2012-03-26 
10:35:24 UTC ---
My answer would be: What does Clang do in this case?


[Bug middle-end/51663] Desirable/undesirable elimination of unused variables & functions at -O0, -O0 -flto and -O0 -fwhole-program

2012-03-26 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663

--- Comment #10 from Jan Hubicka  2012-03-26 10:44:57 
UTC ---
> Yes.  I think for -O0 -flto we should default to 1:1 partitioning and
> _not_ do the renaming of local symbols though ... of course -O0 -flto
> does not make too much sense?

In longer run, I think it would make sense for slim lto, so one don't need to
ship two versions of a same slim-LTO library (one for optimized builds and one
for unoptimized)
Still the LTO code there will be early optimized...

1:1 partitioning has quite serve performance implications that defeat purpose
of -O0, too.

Honza


[Bug target/52717] thunk referenced in discarded section when building samba with -flto

2012-03-26 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52717

--- Comment #3 from Jan Hubicka  2012-03-26 10:48:33 UTC 
---
> > That stuff might simply not be set up properly for LTO (it does not seem
> > to be integrated with the cgraph).  Honza?  Eric?
> 
> Yes, that's very likely the source of the problem.
Hmm, if the sparc_get_pc_thunk is reference to libgcc, how it can end up being
defined
in ltrans24?  Perhaps renaming interfere here with the references done in sparc
frontend?

Honza


[Bug c/52720] internal compiler error: in try_move_mult_to_index

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52720

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-03-26
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2012-03-26 
11:01:50 UTC ---
Works for me.  Please provide the output of your compile command-line with
'-v' appended.  That's important to see what -march=native gets translated to.


[Bug target/52717] thunk referenced in discarded section when building samba with -flto

2012-03-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52717

--- Comment #4 from Eric Botcazou  2012-03-26 
11:05:19 UTC ---
> Hmm, if the sparc_get_pc_thunk is reference to libgcc, how it can end up being
> defined in ltrans24?  Perhaps renaming interfere here with the references 
> done 
> in sparc frontend?

sparc_get_pc_thunk is generated by the compiler, it isn't in libgcc.


[Bug tree-optimization/52272] [4.7/4.8 regression] Performance regresswion of 410.bwaves on x86.

2012-03-26 Thread izamyatin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52272

Igor Zamyatin  changed:

   What|Removed |Added

 CC||izamyatin at gmail dot com

--- Comment #8 from Igor Zamyatin  2012-03-26 
11:05:52 UTC ---
Sort of experimental patch

Index: tree-ssa-loop-ivopts.c
===
--- tree-ssa-loop-ivopts.c  (revision 185039)
+++ tree-ssa-loop-ivopts.c  (working copy)
@@ -4114,6 +4114,7 @@
   else if (ratio == 1)
 {
   tree real_cbase = cbase;
+  int diff_cost, add_cost1;

   /* Check to see if any adjustment is needed.  */
   if (cstepi == 0 && stmt_is_after_inc)
@@ -4133,7 +4134,10 @@
  ubase, real_cbase,
  &symbol_present, &var_present, &offset,
  depends_on);
+  diff_cost = cost.cost;
   cost.cost /= avg_loop_niter (data->current_loop);
+  if (diff_cost > (add_cost1 = add_cost(TYPE_MODE (ctype), data->speed)))
+  cost.cost += add_cost1;
 }
   else if (address_p
   && !POINTER_TYPE_P (ctype)


 It was found during some side investigation regarding ivopts phase work. 
Patch fixes the regression.


[Bug tree-optimization/52721] segfault in vect_init_vector

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52721

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-03-26
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2012-03-26 
11:17:02 UTC ---
Created attachment 26997
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26997
patch

I can't seem to reproduce it with a cross.  Can you check if the following
fixes it?


[Bug middle-end/52701] [4.8 Regression] 416.gamess in SPEC CPU 2006 failed to build

2012-03-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52701

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  2012-03-26 
11:26:49 UTC ---
Reduced testcase:
function pr52701 (x, z, e, f, g, l)
  integer a, b, c, d, e, f, g, i, j, l, pr52701
  double precision x(e), z(e*e)
  do i = l, f
do j = l, i
  d = 0
  do a = 1, g
c = a - g
do b = 1, g
  d = d + 1
  c = c + g
  z(d) = z(d) / (x(i) + x(j) - x(f + a) - x(f + b))
end do
  end do
end do
  end do
  pr52701 = c
end


[Bug middle-end/52701] [4.8 Regression] 416.gamess in SPEC CPU 2006 failed to build

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52701

Richard Guenther  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |

--- Comment #4 from Richard Guenther  2012-03-26 
11:29:21 UTC ---
Mine.


[Bug middle-end/52701] [4.8 Regression] 416.gamess in SPEC CPU 2006 failed to build

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52701

--- Comment #5 from Richard Guenther  2012-03-26 
11:44:55 UTC ---
During analysis we have {c_50, +, pretmp.51_172}_4 as access function.  This
is analyzed to be unknown:

9: Unknown def-use cycle pattern.

but we still vectorize this loop, as the induction (with unknown step,
thus not detected as such) is irrelevant, only the final value after
the loop (thus, a missed SCEV "const"-prop).

Which means we should simply always set STMT_VINFO_LOOP_PHI_EVOLUTION_PART.

I have a patch.


[Bug c/52720] internal compiler error: in try_move_mult_to_index

2012-03-26 Thread treeve at sourcemage dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52720

--- Comment #2 from treeve at sourcemage dot org 2012-03-26 12:11:13 UTC ---
I added '-v' to compile flags, as requested


# make
gcc -c -I. -I../../../../src/gallium/include
-I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers
-I../../../../include -march=native -mtune=native -m64 -pipe -O3 -Wall
-Wmissing-prototypes -std=c99 -fno-strict-aliasing -fno-builtin-memcmp
-march=native -mtune=native -m64 -pipe -O3  -fPIC  -DUSE_X86_64_ASM
-D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1
-DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XCB_DRI2
-D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0300 -fvisibility=hidden -v
-I/usr/include-D_GNU_SOURCE   -Wno-unused-parameter -Wwrite-strings 
-Wno-long-long -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS r600_asm.c -o r600_asm.o
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-pc-linux-gnu
Configured with: /usr/src/gcc-4.7.0/configure --prefix=/usr
--infodir=/usr/share/info --mandir=/usr/share/man --enable-threads=posix
--enable-languages=c,c++ --with-bugurl=http://bugs.sourcemage.org
--enable-bootstrap --enable-checking=release --disable-multilib --without-ppl
--without-cloog --build=x86_64-pc-linux-gnu --with-system-zlib --disable-nls
Thread model: posix
gcc version 4.7.0 (GCC) 
COLLECT_GCC_OPTIONS='-c' '-I' '.' '-I' '../../../../src/gallium/include' '-I'
'../../../../src/gallium/auxiliary' '-I' '../../../../src/gallium/drivers' '-I'
'../../../../include' '-march=native' '-mtune=native' '-pipe' '-O3' '-Wall'
'-Wmissing-prototypes' '-std=c99' '-fno-strict-aliasing' '-fno-builtin-memcmp'
'-march=native' '-mtune=native' '-m64' '-pipe' '-O3' '-fPIC' '-D'
'USE_X86_64_ASM' '-D' '_GNU_SOURCE' '-D' 'PTHREADS' '-D' 'HAVE_POSIX_MEMALIGN'
'-D' 'USE_XCB' '-D' 'GLX_INDIRECT_RENDERING' '-D' 'GLX_DIRECT_RENDERING' '-D'
'USE_EXTERNAL_DXTN_LIB=1' '-D' 'IN_DRI_DRIVER' '-D' 'HAVE_ALIAS' '-D'
'HAVE_MINCORE' '-D' 'HAVE_LIBUDEV' '-D' 'HAVE_XCB_DRI2' '-D'
'__STDC_CONSTANT_MACROS' '-D' 'HAVE_LLVM=0x0300' '-fvisibility=hidden' '-v'
'-I' '/usr/include' '-D' '_GNU_SOURCE' '-Wno-unused-parameter'
'-Wwrite-strings' '-Wno-long-long' '-D' '__STDC_CONSTANT_MACROS' '-D'
'__STDC_FORMAT_MACROS' '-D' '__STDC_LIMIT_MACROS' '-o' 'r600_asm.o'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.0/cc1 -quiet -v -I . -I
../../../../src/gallium/include -I ../../../../src/gallium/auxiliary -I
../../../../src/gallium/drivers -I ../../../../include -I /usr/include -D
USE_X86_64_ASM -D _GNU_SOURCE -D PTHREADS -D HAVE_POSIX_MEMALIGN -D USE_XCB -D
GLX_INDIRECT_RENDERING -D GLX_DIRECT_RENDERING -D USE_EXTERNAL_DXTN_LIB=1 -D
IN_DRI_DRIVER -D HAVE_ALIAS -D HAVE_MINCORE -D HAVE_LIBUDEV -D HAVE_XCB_DRI2 -D
__STDC_CONSTANT_MACROS -D HAVE_LLVM=0x0300 -D _GNU_SOURCE -D
__STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS
r600_asm.c -march=k8-sse3 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul
-mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2
-mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt --param
l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512
-mtune=k8 -quiet -dumpbase r600_asm.c -m64 -auxbase-strip r600_asm.o -O3 -O3
-Wall -Wmissing-prototypes -Wno-unused-parameter -Wwrite-strings -Wno-long-long
-std=c99 -version -fno-strict-aliasing -fno-builtin-memcmp -fPIC
-fvisibility=hidden -o - |
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/as
--64 -o r600_asm.o
GNU C (GCC) version 4.7.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 5.0.4, MPFR version 2.4.2,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/include"
ignoring duplicate directory "/usr/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 .
 ../../../../src/gallium/include
 ../../../../src/gallium/auxiliary
 ../../../../src/gallium/drivers
 ../../../../include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/include-fixed
 /usr/include
End of search list.
GNU C (GCC) version 4.7.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 5.0.4, MPFR version 2.4.2,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 7fe6ef4cb5124df873f31f22bb7f07de
r600_asm.c: In function 'check_and_set_bank_swizzle':
r600_asm.c:780:12: internal compiler error: in try_move_mult_to_index, at
fold-const.c:6995


[Bug c/52720] internal compiler error: in try_move_mult_to_index

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52720

Richard Guenther  changed:

   What|Removed |Added

 Target||x86_64-*-*
 Status|WAITING |NEW

--- Comment #3 from Richard Guenther  2012-03-26 
12:25:16 UTC ---
Confirmed with -O3 -march=k8-sse3, triggered by array prefetching via SCEV.

Reducing.


[Bug lto/52722] New: ICE in lto_output_varpool_node

2012-03-26 Thread malcolm.parsons at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52722

 Bug #: 52722
   Summary: ICE in lto_output_varpool_node
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: malcolm.pars...@gmail.com


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/i2e/Apps-mephisto/gcc-4.7.0/libexec/gcc/x86_64-debian-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-debian-linux-gnu
Configured with: /home/i2e/g++/gcc-4.7.0/configure
--prefix=/home/i2e/Apps-mephisto/gcc-4.7.0 --disable-werror
--enable-gold=default --enable-lto --enable-plugins --with-plugin-ld=ld
--with-sysroot=/home/i2e/Apps-mephisto/sysroot/ --enable-languages=c,c++
--enable-stage1-languages=c,c++ --enable-libstdcxx-debug
--build=x86_64-centos-linux-gnu --host=x86_64-centos-linux-gnu
--target=x86_64-debian-linux-gnu --program-prefix=
--with-stage1-ldflags='-static-libstdc++ -static-libgcc'
Thread model: posix
gcc version 4.7.0 (GCC)

$ g++ -save-temps -c -flto test.cpp && g++ -o test -O2 -flto test.o
lto1: internal compiler error: in lto_output_varpool_node, at lto-cgraph.c:595
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
lto-wrapper: g++ returned 1 exit status
/home/i2e/Apps-mephisto/gcc-4.7.0/lib/gcc/x86_64-debian-linux-gnu/4.7.0/../../../../x86_64-debian-linux-gnu/bin/ld:
fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status

See also bug 51765 comment 3.


[Bug rtl-optimization/52715] [4.8 Regression] ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7140 with -fselective-scheduling2 -funroll-loops --param=max-average-unrolled-insns=406

2012-03-26 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52715

Andrey Belevantsev  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-03-26
 AssignedTo|unassigned at gcc dot   |abel at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Andrey Belevantsev  2012-03-26 
12:26:53 UTC ---
Sigh.  Of course optimizing calculation of whether an insn change the state as
in PR 52203 was wrong, one needs to calculate this right before actually
scheduling the insn as the state may change.  Thus, reverting the fix for 52203
and doing the below instead is not only safe but correct:

diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 2829f60..f5ae9817 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -7127,8 +7124,14 @@ reset_sched_cycles_in_current_ebb (void)

   if (real_insn)
{
+ static state_t temp = NULL;
+
+ if (!temp)
+   temp = xmalloc (dfa_state_size);
+ memcpy (temp, curr_state, dfa_state_size);
+
  cost = state_transition (curr_state, insn);
- if (!empty)
+ if (memcmp (temp, curr_state, dfa_state_size))
issued_insns++;

   if (sched_verbose >= 2)


[Bug middle-end/52720] [4.7/4.8 Regression] internal compiler error: in try_move_mult_to_index

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52720

Richard Guenther  changed:

   What|Removed |Added

  Component|c   |middle-end
  Known to work||4.6.3
   Target Milestone|--- |4.7.1
Summary|internal compiler error: in |[4.7/4.8 Regression]
   |try_move_mult_to_index  |internal compiler error: in
   ||try_move_mult_to_index
   Severity|critical|normal


[Bug lto/52722] ICE in lto_output_varpool_node

2012-03-26 Thread malcolm.parsons at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52722

--- Comment #1 from Malcolm Parsons  
2012-03-26 12:27:46 UTC ---
Created attachment 26998
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26998
gzipped preprocessed source


[Bug tree-optimization/52721] segfault in vect_init_vector

2012-03-26 Thread amodra at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52721

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|UNCONFIRMED
 Ever Confirmed|1   |0

--- Comment #2 from Alan Modra  2012-03-26 12:34:52 
UTC ---
Yes, that patch cures the segfaults.


[Bug middle-end/52720] [4.7/4.8 Regression] internal compiler error: in try_move_mult_to_index

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52720

--- Comment #4 from Richard Guenther  2012-03-26 
12:44:33 UTC ---
Reduced testcase:

struct alu_bank_swizzle {
int hw_gpr[3][4];
int hw_cfile_addr[4];
};
static void init_bank_swizzle(struct alu_bank_swizzle *bs)
{
  int i, cycle, component;
  for (cycle = 0; cycle < 3; cycle++)
for (component = 0; component < 4; component++)
  bs->hw_gpr[cycle][component] = -1;
  for (i = 0; i < 4; i++)
bs->hw_cfile_addr[i] = -1;
}
int check_and_set_bank_swizzle(int max_slots, int *slots)
{
  struct alu_bank_swizzle bs;
  int i;
  for (i = 0; i < max_slots; i++)
{
  init_bank_swizzle(&bs);
  if (slots[i])
check_vector(&bs);
}
}


[Bug c++/52723] New: No declaration of __cxa_eh_globals

2012-03-26 Thread joerg.rich...@pdv-fs.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52723

 Bug #: 52723
   Summary: No declaration of __cxa_eh_globals
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: joerg.rich...@pdv-fs.de


include/c++/4.7.0/cxxabi.h has the functions __cxa_get_globals() and
__cxa_get_globals_fast() returning a pointer to __cxa_eh_globals struct.
But __cxa_eh_globals isn't declared in any installed header file.

libstdc++-v3/libsupc++/unwind-cxx.h has the declaration in the source.

unwind-cxx.h should be installed, shouldn't it?


[Bug lto/52722] ICE in lto_output_varpool_node

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52722

Richard Guenther  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #2 from Richard Guenther  2012-03-26 
12:48:35 UTC ---
I can't reproduce the issue with the attached testcase but the similar looking
ICE in PR51765 can be reproduced with

gcc> make check-g++ RUNTESTFLAGS="--target_board=unix/-flto
dg.exp=cpp0x/variadic-init.C"

Honza, can you have a look?


[Bug middle-end/52720] [4.7/4.8 Regression] internal compiler error: in try_move_mult_to_index

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52720

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #5 from Richard Guenther  2012-03-26 
13:01:14 UTC ---
Mine.


[Bug fortran/52724] New: Internal read with character(kind=4) data

2012-03-26 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52724

 Bug #: 52724
   Summary: Internal read with character(kind=4) data
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tkoe...@gcc.gnu.org


This code in io/unit.c looks fishy:

  /* Set initial values for unit parameters.  */
  if (dtp->common.unit)
{
  iunit->s = open_internal4 (dtp->internal_unit - start_record,
 dtp->internal_unit_len, -start_record);
  fbuf_init (iunit, 256);
}
  else
iunit->s = open_internal (dtp->internal_unit - start_record,
  dtp->internal_unit_len, -start_record);

because it supposes that an internal unit for character(kind=4) data
has an internal unit number which is unequal to zero.

And, in fact, this fails:

ig25@linux-fd1f:~/Krempel/Opt> cat foo.f90
!234567
  character buffer4(100)
  integer i

  buffer4 = 4_'123'
  read(buffer4,*) i
  print *,i
  end
ig25@linux-fd1f:~/Krempel/Opt> gfortran foo.f90
ig25@linux-fd1f:~/Krempel/Opt> ./a.out
   1


[Bug libgcj/52645] gnu/java/net/natPlainDatagramSocketImpl.cc:660:14: error: 'IPPROTO_IPV6' was not declared in this scope

2012-03-26 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52645

--- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE  2012-03-26 13:09:20 UTC ---
> HAVE_INET6 is undefined in include/config.h and classpath/include/ 
> config.h.

Ok, so at least we don't have another case of IPv6 being half-supported.

Did you have a chance to try the attached patch?

Rainer


[Bug tree-optimization/52686] SLP crashes with WIDEN_LSHIFT_EXPR

2012-03-26 Thread uweigand at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52686

--- Comment #3 from Ulrich Weigand  2012-03-26 
13:13:14 UTC ---
Author: uweigand
Date: Mon Mar 26 13:13:07 2012
New Revision: 185795

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185795
Log:
gcc/
PR tree-optimization/52686
* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Handle
WIDEN_LSHIFT_EXPR.

gcc/testsuite/
PR tree-optimization/52686
* gcc.target/arm/pr52686.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/arm/pr52686.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-data-refs.c


[Bug tree-optimization/52686] SLP crashes with WIDEN_LSHIFT_EXPR

2012-03-26 Thread uweigand at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52686

Ulrich Weigand  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Ulrich Weigand  2012-03-26 
13:16:30 UTC ---
Fixed.


[Bug lto/52722] ICE in lto_output_varpool_node

2012-03-26 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52722

Jan Hubicka  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-03-26
 AssignedTo|unassigned at gcc dot   |hubicka at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1


[Bug lto/51765] Testsuite ICEs with -flto

2012-03-26 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51765

Jan Hubicka  changed:

   What|Removed |Added

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


[Bug lto/52722] ICE in lto_output_varpool_node

2012-03-26 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52722

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||markus at trippelsdorf dot
   ||de

--- Comment #3 from Markus Trippelsdorf  
2012-03-26 14:05:56 UTC ---
Somewhat reduced testcase:

 % cat test.ii
namespace std
{
namespace tr1
{
template < int,
 typename ... >struct _Tuple_impl;
template < int _Idx > struct _Tuple_impl <_Idx > {
};
template < typename ... _Elements > class tuple:_Tuple_impl < 0,
_Elements ... >
{
};
}
}
namespace testing
{
namespace
{
class TestFactoryBase
{
};
}
namespace internal
{
template < class TestClass >
class ParameterizedTestFactory:TestFactoryBase
{
public:
typedef typename TestClass::ParamType ParamType;
ParameterizedTestFactory (ParamType):parameter_ () {
TestClass::SetParam (0);
}
ParamType parameter_;
};
template < class > class TestMetaFactoryBase
{
};
template < class TestCase > class TestMetaFactory:public TestMetaFactoryBase <
typename TestCase::
ParamType >
{
typedef typename TestCase::ParamType ParamType;
virtual TestFactoryBase *CreateTestFactory (ParamType p1) {
new ParameterizedTestFactory < TestCase > (p1);
}
};
template < class TestCase > class ParameterizedTestCaseInfo
{
public:
typedef typename TestCase::ParamType ParamType;
void AddTestPattern (char *, char *,
 TestMetaFactoryBase < ParamType > *) {
}
};
class ParameterizedTestCaseRegistry
{
public:
template < class TestCase > ParameterizedTestCaseInfo < TestCase >
*GetTestCasePatternHolder (char *, char *, int) {
}
};
}
class Test
{
};
class UnitTest
{
public:
static UnitTest *GetInstance ();
internal::
ParameterizedTestCaseRegistry & parameterized_test_registry ();
};

template < typename T > class WithParamInterface
{
public:
typedef T ParamType;
static void SetParam (ParamType *) {
parameter_ = 0;
}
static const ParamType *parameter_;
};
template < typename T > const T *WithParamInterface < T >::parameter_;
}

class Foo:
testing::Test,
public
testing::WithParamInterface <
std::tr1::tuple < >>
{
};
class
Foo_Init_Test:
public
Foo
{
static int
AddToRegistry () {
testing::UnitTest::GetInstance ()->parameterized_test_registry ().
GetTestCasePatternHolder < Foo > ("Foo", "test.cpp",
  0)->AddTestPattern ("Foo", "Init",
  new testing::
  internal::
  TestMetaFactory <
  Foo_Init_Test >);
}
static int
gtest_registering_dummy_;
};

int
Foo_Init_Test::gtest_registering_dummy_ = Foo_Init_Test::AddToRegistry ();

 % g++ -o /dev/null -w -std=c++11 -flto test.ii
lto1: internal compiler error: in lto_output_varpool_node, at lto-cgraph.c:595
Please submit a full bug report,
with preprocessed source if appropriate.


[Bug tree-optimization/52721] segfault in vect_init_vector

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52721

--- Comment #3 from Richard Guenther  2012-03-26 
14:13:43 UTC ---
Author: rguenth
Date: Mon Mar 26 14:13:35 2012
New Revision: 185799

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185799
Log:
2012-03-26  Richard Guenther  

PR tree-optimization/52721
* tree-vect-stmts.c (vect_init_vector): Handle scalars.

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


[Bug middle-end/52701] [4.8 Regression] 416.gamess in SPEC CPU 2006 failed to build

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52701

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from Richard Guenther  2012-03-26 
14:15:52 UTC ---
Fixed.


[Bug tree-optimization/52721] segfault in vect_init_vector

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52721

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #4 from Richard Guenther  2012-03-26 
14:16:02 UTC ---
Fixed.


[Bug middle-end/52701] [4.8 Regression] 416.gamess in SPEC CPU 2006 failed to build

2012-03-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52701

--- Comment #6 from Richard Guenther  2012-03-26 
14:15:03 UTC ---
Author: rguenth
Date: Mon Mar 26 14:14:51 2012
New Revision: 185800

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185800
Log:
2012-03-26  Richard Guenther  

PR tree-optimization/52701
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Always
compute and set the evolution part of PHI nodes.

* gfortran.dg/pr52701.f90: New testcase.

Added:
trunk/gcc/testsuite/gfortran.dg/pr52701.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c


[Bug c++/52725] New: error: capture of non-variable (in regards to a variable)

2012-03-26 Thread lahart.joseph at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725

 Bug #: 52725
   Summary: error: capture of non-variable (in regards to a
variable)
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lahart.jos...@gmail.com


Created attachment 26999
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26999
the preprocessed file

~/gcc-test$ g++-4.7.0 -o test -v -save-temps ItemIncGroup.cpp 
Using built-in specs.
COLLECT_GCC=g++-4.7.0
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --program-suffix=-4.7.0
Thread model: posix
gcc version 4.7.0 (GCC) 
COLLECT_GCC_OPTIONS='-o' 'test' '-v' '-save-temps' '-shared-libgcc'
'-mtune=generic' '-march=pentiumpro'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/cc1plus -E -quiet -v
-D_GNU_SOURCE ItemIncGroup.cpp -mtune=generic -march=pentiumpro
-fpch-preprocess -o ItemIncGroup.ii
ignoring nonexistent directory
"/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0

/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/i686-pc-linux-gnu

/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/include
 /usr/local/include
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-o' 'test' '-v' '-save-temps' '-shared-libgcc'
'-mtune=generic' '-march=pentiumpro'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/cc1plus -fpreprocessed
ItemIncGroup.ii -quiet -dumpbase ItemIncGroup.cpp -mtune=generic
-march=pentiumpro -auxbase ItemIncGroup -version -o ItemIncGroup.s
GNU C++ (GCC) version 4.7.0 (i686-pc-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.7.0 (i686-pc-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c256e2cdb5a4ae96bd7afc48ca236d31
ItemIncGroup.cpp: In member function ‘bool
CItemIncGroup::SetIncrementalCountMax()’:
ItemIncGroup.cpp:7:38: error: capture of non-variable
‘CItemIncGroup::m_TotalIncrementalCount’ 
In file included from ItemIncGroup.cpp:3:0:
ItemIncGroup.h:17:18: note: ‘long int CItemIncGroup::m_TotalIncrementalCount’
declared here

Notes: Changing the type of m_pItemIncGroup from CItemInc to int will allow the
code to compile. This code compiled with gcc 4.6.1.


[Bug c++/52688] static local variable can accessed from local class of function template

2012-03-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52688

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-03-26
 Ever Confirmed|0   |1
  Known to fail||4.1.2, 4.4.3, 4.5.2, 4.6.3,
   ||4.7.0

--- Comment #5 from Jonathan Wakely  2012-03-26 
15:31:20 UTC ---
(In reply to comment #0)
> While gcc-4.5.1 compiles fine this code

Are you sure? I get the same error with 4.1.2, 4.4.3, 4.5.2, 4.6.3 and 4.7.0

4.5.2 compiles and links OK with optimisation enabled, but so do the other
versions


[Bug c++/52725] error: capture of non-variable (in regards to a variable)

2012-03-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #1 from Jonathan Wakely  2012-03-26 
15:43:59 UTC ---
It works if you remove the parentheses, which also makes the code valid C++
(currently it relies on a GNU extension that allows a variable array size for a
parenthesised new expression, you get a warning with -pedantic or -Wvla)

It seems that there's some interaction between the C++11 lambda parsing and the
GNU extension


[Bug tree-optimization/50052] [4.6/4.7/4.8 Regression] FAIL: gcc.dg/ipa/ipa-sra-2.c scan-tree-dump eipa_sra

2012-03-26 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50052

--- Comment #9 from Martin Jambor  2012-03-26 
15:46:22 UTC ---
Author: jamborm
Date: Mon Mar 26 15:46:14 2012
New Revision: 185807

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185807
Log:
2012-03-26  Martin Jambor  

PR tree-optimization/50052
* tree-sra.c (tree_non_aligned_mem_p): Removed.
(tree_non_aligned_mem_for_access_p): Likewise.
(build_accesses_from_assign): Removed strict alignment requirements
checks.
(access_precludes_ipa_sra_p): Likewise.

* testsuite/gcc.dg/ipa/ipa-sra-2.c: Also run on strict-alignment
platforms.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/ipa/ipa-sra-2.c
trunk/gcc/tree-sra.c


[Bug c++/52688] static local variable can accessed from local class of function template

2012-03-26 Thread sir_nawaz959 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52688

--- Comment #6 from Sarfaraz Nawaz  2012-03-26 
15:54:46 UTC ---
(In reply to comment #5)
> (In reply to comment #0)
> > While gcc-4.5.1 compiles fine this code
> 
> Are you sure? I get the same error with 4.1.2, 4.4.3, 4.5.2, 4.6.3 and 4.7.0
> 
> 4.5.2 compiles and links OK with optimisation enabled, but so do the other
> versions

I used ideone.com to compile it, which uses gcc-4.5.1 with -std=c++0x.

http://ideone.com/Y2vIF

I just noticed that though it compiles and links fine, but it doesn't print the
expected output. :|

Interestingly, when I remove `const` from the definition of the static local
variable, and then I attempt to change it from the local class, it then gives
error:

http://ideone.com/vvwRc

:-)


[Bug tree-optimization/32199] jc1: out of memory allocating 4072 bytes after a total of 805021000 bytes

2012-03-26 Thread merkil at savhon dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32199

Antoine Balestrat  changed:

   What|Removed |Added

 CC||merkil at savhon dot org

--- Comment #15 from Antoine Balestrat  2012-03-26 
15:52:46 UTC ---
I'm having the same issue, but with a C program. It fails with gcc as of 4.8.0
20120324, but I can reproduce it with 4.6.3 and 4.5.3.
I'm adding the source and the complete build log as an attachment.


[Bug tree-optimization/50052] [4.6/4.7/4.8 Regression] FAIL: gcc.dg/ipa/ipa-sra-2.c scan-tree-dump eipa_sra

2012-03-26 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50052

Martin Jambor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #10 from Martin Jambor  2012-03-26 
15:53:11 UTC ---
The testcase is currently not being run on strict-alignment platforms
on the 4.6 and 4.7 branches and passes fine on trunk.  Backporting the
misalignment expansion changes that allowed is not planned.

Thus, this PR can be finally closed as fixed.  Thank you for your
patience.


[Bug middle-end/45579] Re-enable IPA-CP for "fn spec"

2012-03-26 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45579

Martin Jambor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Martin Jambor  2012-03-26 
15:55:04 UTC ---
Fixed with the new IPA-CP.


[Bug tree-optimization/32199] jc1: out of memory allocating 4072 bytes after a total of 805021000 bytes

2012-03-26 Thread merkil at savhon dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32199

--- Comment #16 from Antoine Balestrat  2012-03-26 
15:55:07 UTC ---
Created attachment 27000
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27000
The source that causes excessive memory usage


[Bug tree-optimization/32199] jc1: out of memory allocating 4072 bytes after a total of 805021000 bytes

2012-03-26 Thread merkil at savhon dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32199

--- Comment #17 from Antoine Balestrat  2012-03-26 
15:56:33 UTC ---
Created attachment 27001
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27001
gcc -O2 -v memfail.c


[Bug target/52726] New: Composed error message will not get translated

2012-03-26 Thread goeran at uddeborg dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52726

 Bug #: 52726
   Summary: Composed error message will not get translated
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: goe...@uddeborg.se


In config/tilepro/tilepro.c there is this code

output_operand_lossage ("invalid %%t operand '"
HOST_WIDE_INT_PRINT_DEC "'", n);

Normally, the first argument of "output_operand_lossage" is extracted for
translation.  When using string concatenation in this way it fails however, and
only the first part, "invalid %%t operand '", will get extracted.  At run time
however, the concatenated string would be used, which will not be available in
the translation catalog.

A trivial workaround would be to compose the format string at run time:

sprintf (buf, gettext("invalid t operand '%s'"),
HOST_WIDE_INT_PRINT_DEC);
output_operand_lossage (buf, n);


[Bug fortran/52724] Internal read with character(kind=4) data

2012-03-26 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52724

Thomas Koenig  changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot
   ||gnu.org

--- Comment #1 from Thomas Koenig  2012-03-26 
16:14:36 UTC ---
Hi Jerry,

do you have any idea?


[Bug libgcj/52694] [4.8 regression] bootstrap failure: libjava/java/io/natVMConsole.cc:35:20: error: 'IUCL C' was not declared in this scope

2012-03-26 Thread gerald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52694

--- Comment #5 from gerald at gcc dot gnu.org  
2012-03-26 16:24:46 UTC ---
Author: gerald
Date: Mon Mar 26 16:24:33 2012
New Revision: 185811

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185811
Log:
PR libgcj/52694
* java/io/natVMConsole.cc (IUCLC): Define, if undefined.

Modified:
trunk/libjava/ChangeLog
trunk/libjava/java/io/natVMConsole.cc


[Bug c++/52727] New: [4.7] internal compiler error at dwarf2cfi.c2:685

2012-03-26 Thread florian at openwrt dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52727

 Bug #: 52727
   Summary: [4.7] internal compiler error at dwarf2cfi.c2:685
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: flor...@openwrt.org


Created attachment 27002
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27002
Preprocessed file

gcc-4.7.0 fails compiling qt 4.7 with : internal compiler error: in
connect_traces, at dwarf2cfi.c:2685

System type:
Target: Linux 2.6.39, GCC 4.7.0, eglibc 2.15

GCC version:
Using built-in specs.
COLLECT_GCC=/opt/toolchains/atom32-eglibc-std-2.15-gcc-4.7.0-binutils-2.22/bin/i686-linux-cc
COLLECT_LTO_WRAPPER=/opt/toolchains/atom32-eglibc-std-2.15-gcc-4.7.0-binutils-2.22/libexec/gcc/i686-fbx-linux-gnu/4.7.0/lto-wrapper
Target: i686-fbx-linux-gnu
Configured with:
/home/florian/work/gen-toolchain/trunk/targets/src/gcc-4.7.0/configure
--build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu
--target=i686-fbx-linux-gnu
--prefix=/opt/toolchains/atom32-eglibc-std-2.15-gcc-4.7.0-binutils-2.22
--with-sysroot=/opt/toolchains/atom32-eglibc-std-2.15-gcc-4.7.0-binutils-2.22/i686-fbx-linux-gnu/sysroot
--enable-languages=c,c++ --with-arch=atom --with-pkgversion='crosstool-NG
1.14.1' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp
--disable-libssp
--with-gmp=/home/florian/work/gen-toolchain/trunk/targets/i686-fbx-linux-gnu/build/static
--with-mpfr=/home/florian/work/gen-toolchain/trunk/targets/i686-fbx-linux-gnu/build/static
--with-mpc=/home/florian/work/gen-toolchain/trunk/targets/i686-fbx-linux-gnu/build/static
--with-ppl=/home/florian/work/gen-toolchain/trunk/targets/i686-fbx-linux-gnu/build/static
--with-cloog=/home/florian/work/gen-toolchain/trunk/targets/i686-fbx-linux-gnu/build/static
--with-libelf=/home/florian/work/gen-toolchain/trunk/targets/i686-fbx-linux-gnu/build/static
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++ -lm
-L/home/florian/work/gen-toolchain/trunk/targets/i686-fbx-linux-gnu/build/static/lib
-lpwl' --enable-threads=posix --enable-target-optspace
--without-long-double-128 --disable-nls --disable-multilib
--with-local-prefix=/opt/toolchains/atom32-eglibc-std-2.15-gcc-4.7.0-binutils-2.22/i686-fbx-linux-gnu/sysroot
--enable-c99 --enable-long-long
Thread model: posix
gcc version 4.7.0 (crosstool-NG 1.14.1) 

no patches have been applied to the gcc sources.

Command-line triggering the bug:

/opt/toolchains/atom32-eglibc-std-2.15-gcc-4.7.0-binutils-2.22/bin/i686-linux-g++
-c -include .pch/release-shared-emb-x86/QtGui -pipe -g -m32 -Os
-ffunction-sections -fdata-sections -std=c++0x
-I/home/florian/work/fbx/buildroot/build/usr/include/freetype2
-fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter
-Wno-inline -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB
-DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS
-DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION
-DQT_NO_FONTCONFIG -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC
-DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK
-DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60
-DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW
-DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3
-DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE
-D_LARGEFILE_SOURCE
-I/home/florian/work/fbx/buildroot/packages/qt/gitsrc/mkspecs/qws/linux-fbx-g++
-I/home/florian/work/fbx/buildroot/packages/qt/gitsrc/src/gui
-I../../include/QtCore -I../../include -I../../include/QtGui
-I.rcc/release-shared-emb-x86
-I/home/florian/work/fbx/buildroot/packages/qt/gitsrc/src/gui/image
-I/home/florian/work/fbx/buildroot/packages/qt/gitsrc/src/3rdparty/harfbuzz/src
-I/home/florian/work/fbx/buildroot/packages/qt/gitsrc/src/gui/dialogs
-I.moc/release-shared-emb-x86 -I.uic/release-shared-emb-x86
-I/home/florian/work/fbx/buildroot/build/usr/include -I. -o
.obj/release-shared-emb-x86/qstylehelper.o
/home/florian/work/fbx/buildroot/packages/qt/gitsrc/src/gui/styles/qstylehelper.cpp
 
/home/florian/work/fbx/buildroot/packages/qt/gitsrc/src/gui/styles/qstylehelper.cpp:
In function 'QPolygonF QStyleHelper::calcLines(const QStyleOptionSlider*)':
/home/florian/work/fbx/buildroot/packages/qt/gitsrc/src/gui/styles/qstylehelper.cpp:206:1:
internal compiler error: in connect_traces, at dwarf2cfi.c:2685


[Bug c++/52727] [4.7] internal compiler error at dwarf2cfi.c2:685

2012-03-26 Thread florian at openwrt dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52727

--- Comment #1 from Florian Fainelli  2012-03-26 
16:51:13 UTC ---
Created attachment 27003
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27003
Assembly file


[Bug c++/52727] [4.7] internal compiler error at dwarf2cfi.c2:685

2012-03-26 Thread florian at openwrt dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52727

--- Comment #2 from Florian Fainelli  2012-03-26 
16:51:54 UTC ---
I will try to create a reduced test-case for this build failure. Thanks!


[Bug libgcj/52694] [4.8 regression] bootstrap failure: libjava/java/io/natVMConsole.cc:35:20: error: 'IUCL C' was not declared in this scope

2012-03-26 Thread gerald at pfeifer dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52694

Gerald Pfeifer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from Gerald Pfeifer  2012-03-26 
17:02:58 UTC ---
Verified fixed on i386-unknown-freebsd10.0 as well.


[Bug target/52717] thunk referenced in discarded section when building samba with -flto

2012-03-26 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52717

--- Comment #5 from Matt Hargett  2012-03-26 17:09:55 UTC 
---
Attachment was too big. Here's a URL for an archive that includes the ltrans
objects, ltrans asm, and cc temp files:
http://www.clock.org/~matt/tmp/smbta-util-lto-failure-temps.tar.bz2

I can provide the whole source dir or a VM image if that helps.

binutils version is freshly compiled with GCC 4.7.0 RC1:
debian-sparc:~/src/samba-3.6.3/source3# ld --version
GNU ld (GNU Binutils) 2.22.52.20120317
Copyright 2012 Free Software Foundation, Inc.

using this configure line for binutils:
../configure --prefix=/opt/gcc-4.7.0/ --enable-lto --with-gmp=/opt/gcc-4.7.0/
--with-mpfr=/opt/gcc-4.7.0/ --with-mpc=/opt/gcc-4.7.0/
--with-cloog=/opt/gcc-4.7.0/ --with-ppl=/opt/gcc-4.7.0 --enable-gold
--enable-cloog-backend=isl --disable-cloog-version-check --enable-plugins

and then this configure line for gcc 4.7.0:
 ../configure --prefix=/opt/gcc-4.7.0/ --enable-lto --with-gmp=/opt/gcc-4.7.0/
--with-mpfr=/opt/gcc-4.7.0/ --with-mpc=/opt/gcc-4.7.0/
--with-cloog=/opt/gcc-4.7.0/ --with-ppl=/opt/gcc-4.7.0 --enable-gold
--enable-cloog-backend=isl --enable-plugins --with-build-config=bootstrap-lto
--disable-libstdcxx-pch --enable-thread-safe --enable-threads=posix
--with-libelf=/opt/gcc-4.7.0/ --enable-languages=c,c++,lto --disable-bootstrap
--with-tune=leon --enable-build-with-cxx --disable-cloog-version-check
--disable-nls


[Bug c++/52727] [4.7] internal compiler error at dwarf2cfi.c2:685

2012-03-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52727

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  2012-03-26 
17:14:53 UTC ---
The preprocessed source is useless, because you are using PCH.
See http://gcc.gnu.org/bugs/#pch


[Bug target/52717] thunk referenced in discarded section when building samba with -flto

2012-03-26 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52717

--- Comment #6 from Matt Hargett  2012-03-26 17:32:51 UTC 
---
The link line that fails:
gcc -o bin/smbta-util utils/smbta-util.o dynconfig.o param/loadparm.o
param/loadparm_server_role.o param/util.o lib/sharesec.o
lib/ldap_debug_handler.o registry/reg_api.o registry/reg_dispatcher.o
registry/reg_cachehook.o registry/reg_objects.o registry/reg_util_internal.o
lib/util_nttoken.o registry/reg_backend_db.o registry/reg_init_basic.o
registry/reg_util_token.o registry/reg_api_util.o
registry/reg_backend_smbconf.o registry/reg_init_smbconf.o
../lib/smbconf/smbconf.o ../lib/smbconf/smbconf_util.o
../lib/smbconf/smbconf_txt.o lib/smbconf/smbconf_reg.o
lib/smbconf/smbconf_init.o ../libcli/security/privileges.o lib/popt_common.o
./../lib/replace/replace.o ./../lib/replace/snprintf.o
./../lib/replace/getpass.o ../lib/util/rbtree.o ../lib/util/signal.o
../lib/util/time.o ../lib/util/xfile.o ../lib/util/util_strlist.o
../lib/util/util_file.o ../lib/util/data_blob.o ../lib/util/util.o
../lib/util/fsusage.o ../lib/util/params.o ../lib/util/talloc_stack.o
../lib/util/genrand.o ../lib/util/util_net.o ../lib/util/become_daemon.o
../lib/util/system.o ../lib/util/tevent_unix.o ../lib/util/tevent_ntstatus.o
../lib/util/tevent_werror.o ../lib/util/smb_threads.o ../lib/util/util_id.o
../lib/util/blocking.o ../lib/util/rfc1738.o ../lib/util/select.o
../lib/util/util_pw.o ../lib/crypto/crc32.o ../lib/crypto/md5.o
../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o ../lib/crypto/md4.o
../lib/crypto/sha256.o ../lib/crypto/hmacsha256.o ../lib/crypto/aes.o
../lib/crypto/rijndael-alg-fst.o lib/messages.o librpc/gen_ndr/ndr_messaging.o
lib/messages_local.o lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o
lib/interfaces.o lib/memcache.o lib/talloc_dict.o lib/serverid.o
lib/util_sconn.o lib/util_transfer_file.o ../lib/async_req/async_sock.o
lib/addrchange.o lib/util_tdb.o ../lib/util/util_tdb.o ../lib/util/tdb_wrap.o
lib/dbwrap.o lib/dbwrap_tdb.o lib/dbwrap_ctdb.o lib/g_lock.o lib/dbwrap_rbt.o
lib/version.o lib/charcnv.o ../lib/util/debug.o ../lib/util/debug_s3.o
lib/fault.o lib/interface.o lib/pidfile.o lib/system.o lib/sendfile.o
lib/recvfile.o lib/time.o lib/username.o ../libds/common/flag_mapping.o
lib/access.o lib/smbrun.o lib/bitmap.o lib/dprintf.o
../libcli/registry/util_reg.o lib/wins_srv.o lib/util_str.o lib/clobber.o
lib/util_sid.o lib/util_unistr.o ../lib/util/charset/codepoints.o
lib/util_file.o lib/util.o lib/util_cmdline.o lib/util_names.o lib/util_sock.o
lib/sock_exec.o lib/util_sec.o lib/substitute.o lib/dbwrap_util.o
lib/ms_fnmatch.o lib/errmap_unix.o lib/tallocmsg.o lib/dmallocmsg.o
libsmb/clisigning.o libsmb/smb_signing.o ../lib/util/charset/iconv.o
intl/lang_tdb.o lib/conn_tdb.o lib/adt_tree.o lib/gencache.o
lib/sessionid_tdb.o lib/module.o lib/events.o ./../lib/tevent/tevent.o
./../lib/tevent/tevent_debug.o ./../lib/tevent/tevent_util.o
./../lib/tevent/tevent_fd.o ./../lib/tevent/tevent_timed.o
./../lib/tevent/tevent_immediate.o ./../lib/tevent/tevent_signal.o
./../lib/tevent/tevent_req.o ./../lib/tevent/tevent_wakeup.o
./../lib/tevent/tevent_queue.o ./../lib/tevent/tevent_standard.o
./../lib/tevent/tevent_select.o ./../lib/tevent/tevent_poll.o
./../lib/tevent/tevent_epoll.o lib/server_contexts.o lib/ldap_escape.o
lib/secdesc.o ../libcli/security/access_check.o ../libcli/security/secace.o
../libcli/security/object_tree.o ../libcli/security/sddl.o
../libcli/security/secacl.o lib/fncall.o libads/krb5_errs.o lib/system_smbd.o
lib/audit.o ../librpc/ndr/ndr_basic.o ../librpc/ndr/ndr.o
../librpc/ndr/ndr_misc.o librpc/gen_ndr/ndr_misc.o
librpc/gen_ndr/ndr_security.o ../librpc/ndr/ndr_sec_helper.o
../librpc/ndr/ndr_string.o ../librpc/ndr/uuid.o librpc/ndr/util.o
librpc/gen_ndr/ndr_server_id.o librpc/gen_ndr/ndr_dcerpc.o lib/file_id.o
lib/idmap_cache.o ../libcli/security/dom_sid.o
../libcli/security/security_descriptor.o ../libcli/security/security_token.o
../libcli/security/util_sid.o lib/dummysmbd.o lib/dummyroot.o libsmb/nterr.o
libsmb/smberr.o ../libcli/util/doserr.o libsmb/errormap.o
../librpc/rpc/dcerpc_error.o ../libcli/auth/smbdes.o
../libcli/auth/smbencrypt.o ../libcli/auth/msrpc_parse.o
../libcli/auth/session.o passdb/secrets.o passdb/machine_account_secrets.o
passdb/machine_sid.o librpc/gen_ndr/ndr_secrets.o lib/filename_util.o -pie
-Wl,-z,relro -O2 -flto -L./bin -Wl,--export-dynamic -lresolv -lresolv -lnsl
-ldl -lrt -lldap -llber -lpopt -ltalloc -ltdb

To make the failure go away, just add -finline-functions. Similarly, changing
-O2 to -O3 also eliminates the error.


[Bug ada/52728] New: Assert_Failure sinfo.adb

2012-03-26 Thread oka.sux at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52728

 Bug #: 52728
   Summary: Assert_Failure sinfo.adb
Classification: Unclassified
   Product: gcc
   Version: 4.6.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: oka@gmail.com


localhost: gnatmake -gnatd.n -Wall -Wextra bug_test.adb
gcc -c -gnatd.n -Wall -Wextra bug_test.adb
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/system.ads
bug_test.adb
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/ada.ads
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/a-comlin.ads
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/s-vallli.ads
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/s-secsta.ads
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/s-stoele.ads
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/s-stoele.adb
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/adainclude/a-unccon.ads
+===GNAT BUG DETECTED==+
| 4.6.3 (i686-pc-linux-gnu) Assert_Failure sinfo.adb:1072  |
| Error detected at bug_test.adb:7:27  |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

bug_test.adb

compilation abandoned
gnatmake: "bug_test.adb" compilation error
localhost: cat bug_test.adb 
with Ada.Command_Line; use Ada.Command_Line;

procedure Bug_Test is
  Arg_Array  : array (1 .. 5) of Integer;

begin
  for I in Argument_Count loop
Arg_Array (I) := Integer'Value (Argument (I));
  end loop;
end Bug_Test;

localhost: gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /build/src/gcc-4.6.3/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib
--disable-libssp --enable-checking=release
Thread model: posix
gcc version 4.6.3 (GCC)


[Bug fortran/52729] New: Symbol has no implicit type in SELECT TYPE block

2012-03-26 Thread abenson at caltech dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52729

 Bug #: 52729
   Summary: Symbol has no implicit type in SELECT TYPE block
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: aben...@caltech.edu


The following fails to compile with the latest gfortran 4.8 (r185768):

module testMod

  type testType
  end type testType

contains

  subroutine testSub()
implicit none
procedure(double precision ), pointer :: r
class(testType ), pointer :: testObject
double precision  :: testVal

select type (testObject)
class is (testType)
   testVal=testFunc()
   r => testFunc
end select
return
  end subroutine testSub

  double precision function testFunc()
implicit none
return
  end function testFunc

end module testMod

$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/libexec/gcc/x86_64-unknown-linux-
gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7/configure --prefix=/home/abenson --enable-
languages=c,c++,fortran --disable-multilib --with-gmp=/home/abenson --with-
mpc=/home/abenson --with-mpfr=/home/abenson
Thread model: posix
gcc version 4.8.0 20120324 (experimental) (GCC) 

$ gfortran -c test.F90 -o test.o
test.F90:16.23:

   testVal=testFunc()
   1
Error: Symbol 'testfunc' at (1) has no IMPLICIT type

Removing the "r => " line, removing the "select type", "class is" and "end 
select" lines or moving testFunc before testSub in the file all allow the code 
to compile successfully.


[Bug bootstrap/52730] New: [4.8 Regression] bootstrap failure on Linux/ia32

2012-03-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730

 Bug #: 52730
   Summary: [4.8 Regression] bootstrap failure on Linux/ia32
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com


On Linux/ia32, revision 185813 gave

/export/gnu/import/svn/gcc-test-ia32corei7/bld/./gcc/gcj
-B/export/gnu/import/svn/gcc-test-ia32corei7/bld/i686-linux/libjava/
-B/export/gnu/import/svn/gcc-test-ia32corei7/bld/./gcc/
-B/usr/local/i686-linux/bin/ -B/usr/local/i686-linux/lib/ -isystem
/usr/local/i686-linux/include -isystem /usr/local/i686-linux/sys-include
-ffloat-store -fomit-frame-pointer -Usun -fclasspath=
-fbootclasspath=../../../src-trunk/libjava/classpath/lib --encoding=UTF-8
-Wno-deprecated -fbootstrap-classes -g -O2 -c
-fsource-filename=../../../src-trunk/libjava/java/lang/Class.java
../../../src-trunk/libjava/classpath/lib/java/lang/Class.class  -fPIC -o
java/lang/.libs/Class.o
jc1: internal compiler error: in assemble_external, at varasm.c:2179
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug bootstrap/52730] [4.8 Regression] bootstrap failure on Linux/ia32

2012-03-26 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730

Steven Bosscher  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-03-26
 CC||steven at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |steven at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1


[Bug bootstrap/52730] [4.8 Regression] bootstrap failure on Linux/ia32

2012-03-26 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730

--- Comment #1 from Steven Bosscher  2012-03-26 
19:20:45 UTC ---
How disgusting. Java still emits RTL from the front end:

Breakpoint 1, internal_error (gmsgid=0x1551007 "in %s, at %s:%d") at
../../trunk/gcc/diagnostic.c:843
843   va_start (ap, gmsgid);
(gdb) up
#1  0x0120a503 in fancy_abort (file=0x135398c
"../../trunk/gcc/varasm.c", line=2179, function=0x1354450 "assemble_external")
at ../../trunk/gcc/diagnostic.c:899
899   internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) 
#2  0x00d8942d in assemble_external (decl=0x770d7be0) at
../../trunk/gcc/varasm.c:2178
2178  gcc_assert (cgraph_state == CGRAPH_STATE_EXPANSION
(gdb) l
2173  /* This function should only be called if we are expanding, or have
2174 expanded, to RTL.
2175 Ideally, only final.c would be calling this function, but it is
2176 not clear whether that would break things somehow.  See PR 17982
2177 for further discussion.  */
2178  gcc_assert (cgraph_state == CGRAPH_STATE_EXPANSION
2179  || cgraph_state == CGRAPH_STATE_FINISHED);
2180
2181  if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
2182return;
(gdb) p cgraph_state
$1 = CGRAPH_STATE_CONSTRUCTION
(gdb) bt 20
#0  internal_error (gmsgid=0x1551007 "in %s, at %s:%d") at
../../trunk/gcc/diagnostic.c:843
#1  0x0120a503 in fancy_abort (file=0x135398c
"../../trunk/gcc/varasm.c", line=2179, function=0x1354450 "assemble_external")
at ../../trunk/gcc/diagnostic.c:899
#2  0x00d8942d in assemble_external (decl=0x770d7be0) at
../../trunk/gcc/varasm.c:2178
#3  0x006f0c48 in output_addr_const (file=0x1ad94f0, x=0x771b2c00)
at ../../trunk/gcc/final.c:3568
#4  0x00d89ee4 in assemble_integer_with_op (op=0x135e56d "\t.quad\t",
x=0x771b2c00) at ../../trunk/gcc/varasm.c:2466
#5  0x00d89fa8 in default_assemble_integer (x=0x771b2c00, size=8,
aligned_p=1) at ../../trunk/gcc/varasm.c:2482
#6  0x00d8a05c in assemble_integer (x=0x771b2c00, size=8, align=64,
force=0) at ../../trunk/gcc/varasm.c:2498
#7  0x00d96806 in output_constant (exp=0x76df5e38, size=8,
align=64) at ../../trunk/gcc/varasm.c:4562
#8  0x004baedf in emit_register_classes (list_p=0x7fffd880) at
../../trunk/gcc/java/class.c:2833
#9  0x0050b1e5 in java_emit_static_constructor () at
../../trunk/gcc/java/jcf-parse.c:1697
#10 0x0050c298 in java_parse_file () at
../../trunk/gcc/java/jcf-parse.c:1978
#11 0x00a5c6a2 in compile_file () at ../../trunk/gcc/toplev.c:556
#12 0x00a5eb5a in do_compile () at ../../trunk/gcc/toplev.c:1936
#13 0x00a5ecaf in toplev_main (argc=33, argv=0x7fffdb88) at
../../trunk/gcc/toplev.c:2012
#14 0x005235e3 in main (argc=33, argv=0x7fffdb88) at
../../trunk/gcc/main.c:36
(gdb)


[Bug target/52731] New: internal compiler error: in ia64_st_address_bypass_p, at config/ia64/ia64.c:9357

2012-03-26 Thread awl at passagen dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52731

 Bug #: 52731
   Summary: internal compiler error: in ia64_st_address_bypass_p,
at config/ia64/ia64.c:9357
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: a...@passagen.se


Created attachment 27004
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27004
Preprocessed test case

Internal compiler error in GCC 4.7.0 on IA64. Fault exists also in older
versions of GCC.

Target: ia64-unknown-linux-gnu
Configured with: /home/user/build/gcc-4.7.0/configure
--prefix=/home/user/software --with-gmp=/home/user/software
--with-mpfr=/home/user/software --with-mpc=/home/user/software
--with-system-libunwind --enable-languages=c,c++

$ gcc -c -O2 ia64_8451.cc
ia64_8451.cc: In function 'void fun(long unsigned int)':
ia64_8451.cc:16:1: internal compiler error: in ia64_st_address_bypass_p, at
config/ia64/ia64.c:9357
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
$ cat ia64_8451.cc
char* area;
long int area_size;
char* base;

void fun(unsigned long int addr)
{
   unsigned long int size32 = (addr + 4096 - 1) & ~(4096 - 1);
   unsigned long int size = size32 * sizeof(unsigned int);

   if (size > 0) {
  size = (size + 16384 -1) & ~(16384 - 1);
   }

   area_size = size;
   area = base + size;
}
$


[Bug c/51712] -Wtype-limits should not trigger for types of implementation-defined signedness

2012-03-26 Thread jrnieder at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712

--- Comment #2 from Jonathan Nieder  2012-03-26 
20:12:17 UTC ---
Clang does not consider "arg >= FOO" to be a comparison against 0.

| commit e3b159c0
| Author: Ted Kremenek 
| Date:   Thu Sep 23 21:43:44 2010 +
|
| When warning about comparing an unsigned int to being >= 0, don't issue a
warning if the zero value was an
| enum or was expanded from a macro.
|
| Fixes: 
|
| git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114695
91177308-0d34-0410-b5e6-96231b3b80d8
|
| diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
| index 790e7671..c4e86875 100644
| --- a/lib/Sema/SemaChecking.cpp
| +++ b/lib/Sema/SemaChecking.cpp
| @@ -2449,7 +2449,17 @@ bool IsSameFloatAfterCast(const APValue &value,
|  
|  void AnalyzeImplicitConversions(Sema &S, Expr *E);
|  
| -bool IsZero(Sema &S, Expr *E) {
| +static bool IsZero(Sema &S, Expr *E) {
| +  // Suppress cases where we are comparing against an enum constant.
| +  if (const DeclRefExpr *DR =
| +  dyn_cast(E->IgnoreParenImpCasts()))
| +if (isa(DR->getDecl()))
| +  return false;
| +
| +  // Suppress cases where the '0' value is expanded from a macro.
| +  if (E->getLocStart().isMacroID())
| +return false;
| +
|llvm::APSInt Value;
|return E->isIntegerConstantExpr(Value, S.Context) && Value == 0;
|  }
[...]


[Bug java/52730] Java front end emits assembly

2012-03-26 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730

Steven Bosscher  changed:

   What|Removed |Added

  Component|bootstrap   |java
Version|4.7.0   |4.8.0
Summary|[4.8 Regression] bootstrap  |Java front end emits
   |failure on Linux/ia32   |assembly

--- Comment #2 from Steven Bosscher  2012-03-26 
20:18:49 UTC ---
I believe the following should fix the problem, altough I fail to see how this
can ever have worked with LTO.  HJ, could you test this for me, please? I have
no access to ia32 anymore. 

Index: class.c
===
--- class.c (revision 185813)
+++ class.c (working copy)
@@ -3241,6 +3241,7 @@ java_write_globals (void)
   write_global_declarations ();
   emit_debug_global_declarations (vec, len);
   VEC_free (tree, gc, pending_static_fields);
+  java_emit_static_constructor ();
 }

 #include "gt-java-class.h"
Index: jcf-parse.c
===
--- jcf-parse.c (revision 185813)
+++ jcf-parse.c (working copy)
@@ -1689,7 +1689,7 @@ predefined_filename_p (tree node)
 /* Generate a function that does all static initialization for this 
translation unit.  */

-static void
+void
 java_emit_static_constructor (void)
 {
   tree body = NULL;
@@ -1974,8 +1974,6 @@ java_parse_file (void)
   bitmap_obstack_release (&bit_obstack);

  finish:
-  /* Arrange for any necessary initialization to happen.  */
-  java_emit_static_constructor ();
   gcc_assert (global_bindings_p ());
 }

Index: java-tree.h
===
--- java-tree.h (revision 185813)
+++ java-tree.h (working copy)
@@ -940,6 +940,7 @@ struct GTY((variable_size)) lang_type {
 struct eh_range;

 extern void java_parse_file (void);
+extern void java_emit_static_constructor (void);
 extern tree java_type_for_mode (enum machine_mode, int);
 extern tree java_type_for_size (unsigned int, int);
 extern tree java_truthvalue_conversion (tree);


[Bug java/52730] Java front end emits assembly

2012-03-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot
   ||gnu.org

--- Comment #3 from Eric Botcazou  2012-03-26 
20:53:34 UTC ---
> I believe the following should fix the problem, altough I fail to see how this
> can ever have worked with LTO. 

Java doesn't work with LTO.


[Bug java/52730] Java front end emits assembly

2012-03-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730

--- Comment #4 from H.J. Lu  2012-03-26 21:09:17 
UTC ---
(In reply to comment #2)
> I believe the following should fix the problem, altough I fail to see how this
> can ever have worked with LTO.  HJ, could you test this for me, please? I have
> no access to ia32 anymore. 

It also failed on Linux/x86-64:

http://gcc.gnu.org/ml/gcc-regression/2012-03/msg00268.html

when configured with

--prefix=/usr/local --enable-clocale=gnu --with-system-zlib --enable-shared
--with-demangler-in-ld --with-fpmath=sse
--enable-languages=c,c++,fortran,java,lto,objc


[Bug c++/32204] friend from global namespace in template class ignored

2012-03-26 Thread dpiepgrass at mentoreng dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32204

David Piepgrass  changed:

   What|Removed |Added

 CC||dpiepgrass at mentoreng dot
   ||com

--- Comment #3 from David Piepgrass  
2012-03-26 21:20:11 UTC ---
I have run into this bug or a similar bug while porting my code from MSVC to
GCC. I need to declare that a class in the global namespace is a friend of my
template class. However, I discovered that the bug still occurs if no templates
are involved. Here's my repro:

class Friend;
namespace Foo
{
class Base {
};
class Derived : protected Base {
friend class Friend;
};
}
class Friend {
void F(const Foo::Derived* data) const 
{
// error: 'Foo::Base' is an inaccessible base of 'Foo::Derived'
const Foo::Base* dataB = data;
}
};

The problem disappears if either (A) Derived is not in a namespace, or (B)
Friend is in a namespace (the forward declaration of Friend is required and, of
course, must be put in the namespace too).


[Bug c++/32204] friend from global namespace in template class ignored

2012-03-26 Thread dpiepgrass at mentoreng dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32204

--- Comment #4 from David Piepgrass  
2012-03-26 21:24:26 UTC ---
(In reply to comment #3) I forgot to mention my GCC version, 4.4.3 (the Windows
build that comes with the current Android SDK.)


[Bug java/52730] Java front end emits assembly

2012-03-26 Thread stevenb.gcc at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52730

--- Comment #5 from stevenb.gcc at gmail dot com  
2012-03-26 21:31:44 UTC ---
Yes, I've reverted that patch for the time being.


[Bug c/52732] New: __builtin_bswapXX doesn't work with printf format

2012-03-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52732

 Bug #: 52732
   Summary: __builtin_bswapXX doesn't work with printf format
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com


Somehow, GCC gets very confused:

[hjl@gnu-6 gcc]$ cat /tmp/f.c
#include 

void
foo (int x, long y)
{
  printf ("%u\n", __builtin_bswap32 (x));
  printf ("%u\n", x);
  printf ("%lu\n", __builtin_bswap64 (x));
  printf ("%lu\n", y);
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -Wall -c /tmp/f.c
/tmp/f.c: In function ‘foo’:
/tmp/f.c:6:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but
argument 2 has type ‘unsigned int’ [-Wformat]
/tmp/f.c:8:3: warning: format ‘%lu’ expects argument of type ‘long unsigned
int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
[hjl@gnu-6 gcc]$


[Bug c/52732] __builtin_bswapXX doesn't work with printf format

2012-03-26 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52732

--- Comment #1 from joseph at codesourcery dot com  2012-03-26 22:14:01 UTC ---
See bug 37743.


[Bug c++/32204] friend from global namespace in template class ignored

2012-03-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32204

--- Comment #5 from Jonathan Wakely  2012-03-26 
23:45:55 UTC ---
(In reply to comment #3)
> I have run into this bug or a similar bug while porting my code from MSVC to
> GCC.

I don't think you have, I think GCC is right to reject your code and MSVC was
wrong to accept it.

> I need to declare that a class in the global namespace is a friend of my
> template class. However, I discovered that the bug still occurs if no 
> templates
> are involved.

Because you haven't hit this bug :)

> Here's my repro:
> 
> class Friend;
> namespace Foo
> {
> class Base {
> };
> class Derived : protected Base {
> friend class Friend;

The standard says this declares Friend as a member of the "innermost non-class
scope" which is namespace Foo.

> };
> }
> class Friend {
> void F(const Foo::Derived* data) const 
> {
> // error: 'Foo::Base' is an inaccessible base of 'Foo::Derived'
> const Foo::Base* dataB = data;
> }
> };
> 
> The problem disappears if either (A) Derived is not in a namespace, 

Because then the innermost enclosing non-class scope is the global namespace,
so the same ::Friend class is found.

> or (B)
> Friend is in a namespace (the forward declaration of Friend is required and, 
> of
> course, must be put in the namespace too).

Because then you define the same class as declared by the friend declaration.


To fix your code you should change the friend declaration to refer to ::Friend

friend class ::Friend;

Or in C++11

friend Friend;

In both these forms the friend declaration refers to the already-declared
::Friend rather than declaring a new Foo::Friend class.


[Bug c++/32204] friend from global namespace in template class ignored

2012-03-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32204

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to work||4.6.3, 4.7.0, 4.8.0
 Resolution||FIXED
   Target Milestone|--- |4.6.0
  Known to fail||4.5.1

--- Comment #6 from Jonathan Wakely  2012-03-26 
23:51:26 UTC ---
G++ 4.6.0 and later correctly compile this

namespace A { template < class PIX > class B; }

void f(A::B&);

template < class PIX > class A::B {
  friend void ::f(A::B&);
  PIX z;
};

void f(A::B& i) { int a = i.z; }

int main() {
  A::B b;
  f(b); // 1. error: f is ambiguous (no, there is no 2nd declaration!)
  ::f(b);   // 2. error: z is private (yes, but 'f' is a friend)
// A::f(b);  // 3. error: f is not a member of A (of course)
}

So I think this bug is fixed


[Bug libgcj/52645] gnu/java/net/natPlainDatagramSocketImpl.cc:660:14: error: 'IPPROTO_IPV6' was not declared in this scope

2012-03-26 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52645

--- Comment #10 from dave.anglin at bell dot net 2012-03-27 00:44:41 UTC ---
On 26-Mar-12, at 9:09 AM, ro at CeBiTec dot Uni-Bielefeld.DE wrote:

> Did you have a chance to try the attached patch?

Testing

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


[Bug c++/52733] New: Cannot compile gcc/g++ on Mac OS X 10.6.8

2012-03-26 Thread chris.jonesey at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52733

 Bug #: 52733
   Summary: Cannot compile gcc/g++ on Mac OS X 10.6.8
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: chris.jone...@gmail.com


I downloaded GCC 4.7.0 released [2012-03-22] and was unable to build gcc/g++.
I used the following configure command:

% ./configure --prefix=`pwd`/inst --enable-languages=c,c++

I also tried it without the --enable-languages with the same result.  The error
I received is below.  I would be happy to provide any other information that is
useful to tracking down this error.

---

config.status: executing libtool commands
config.status: executing include/gstdint.h commands
config.status: executing generate-headers commands
make[3]: Nothing to be done for `all'.
make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc"
"CC_FOR_TARGET=/Users/chrisj/Packages/gcc-4.7.0/host-x86_64-apple-darwin10.8.0/gcc/xgcc
-B/Users/chrisj/Packages/gcc-4.7.0/host-x86_64-apple-darwin10.8.0/gcc/"
"CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2"
"CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c"
"INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c"
"INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2"
"LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo
--split-size=500 --split-size=500 --split-size=500 " "PICFLAG="
"PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS="
"exec_prefix=/Users/chrisj/Packages/gcc-4.7.0/inst"
"infodir=/Users/chrisj/Packages/gcc-4.7.0/inst/share/info"
"libdir=/Users/chrisj/Packages/gcc-4.7.0/inst/lib"
"includedir=/Users/chrisj/Packages/gcc-4.7.0/inst/include"
"prefix=/Users/chrisj/Packages/gcc-4.7.0/inst"
"tooldir=/Users/chrisj/Packages/gcc-4.7.0/inst/x86_64-apple-darwin10.8.0"
"gxx_include_dir=/Users/chrisj/Packages/gcc-4.7.0/inst/include/c++/4.7.0"
"AR=ar"
"AS=/Users/chrisj/Packages/gcc-4.7.0/host-x86_64-apple-darwin10.8.0/gcc/as"
"LD=/Users/chrisj/Packages/gcc-4.7.0/host-x86_64-apple-darwin10.8.0/gcc/collect-ld"
"RANLIB=ranlib"
"NM=/Users/chrisj/Packages/gcc-4.7.0/host-x86_64-apple-darwin10.8.0/gcc/nm"
"NM_FOR_BUILD=" "NM_FOR_TARGET=nm" "DESTDIR=" "WERROR=" all-recursive
Making all in include
mkdir -p ./x86_64-apple-darwin10.8.0/bits/stdc++.h.gch
/Users/chrisj/Packages/gcc-4.7.0/host-x86_64-apple-darwin10.8.0/gcc/xgcc
-shared-libgcc
-B/Users/chrisj/Packages/gcc-4.7.0/host-x86_64-apple-darwin10.8.0/gcc
-nostdinc++
-L/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/src
-L/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-B/Users/chrisj/Packages/gcc-4.7.0/inst/x86_64-apple-darwin10.8.0/bin/
-B/Users/chrisj/Packages/gcc-4.7.0/inst/x86_64-apple-darwin10.8.0/lib/ -isystem
/Users/chrisj/Packages/gcc-4.7.0/inst/x86_64-apple-darwin10.8.0/include
-isystem
/Users/chrisj/Packages/gcc-4.7.0/inst/x86_64-apple-darwin10.8.0/sys-include   
-x c++-header -nostdinc++ -g -O2
-I/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include/x86_64-apple-darwin10.8.0
-I/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include
-I/Users/chrisj/Packages/gcc-4.7.0/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x
/Users/chrisj/Packages/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h \
-o x86_64-apple-darwin10.8.0/bits/stdc++.h.gch/O2ggnu++0x.gch
init2.c:37: MPFR assertion failed: ((32 - 0)+0) == (((32 - 0)+0)/8) * 8 &&
sizeof(mp_limb_t) == (((32 - 0)+0)/8)
In file included from
/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include/random:51:0,
 from
/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include/bits/stl_algo.h:67,
 from
/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include/algorithm:63,
 from
/Users/chrisj/Packages/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:65:
/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include/bits/random.tcc:
In member function ‘std::independent_bits_engine<_RandomNumberEngine, __w,
_UIntType>::result_type std::independent_bits_engine<_RandomNumberEngine, __w,
_UIntType>::operator()()’:
/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include/bits/random.tcc:735:60:
  in constexpr expansion of ‘std::log(2.0e+0l)’
/Users/chrisj/Packages/gcc-4.7.0/x86_64-apple-darwin10.8.0/libstdc++-v3/include/bits/random.tcc:735:60:
internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[5]: *** [x86_64-apple-darwin10.8.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Error
1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-stage1-target-libstdc++-v3

[Bug target/38627] SuperH libgcc.a lacks .note.GNU-stack markings in math funcs

2012-03-26 Thread vapier at gentoo dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38627

Mike Frysinger  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
  Known to fail||

--- Comment #4 from Mike Frysinger  2012-03-27 
04:47:32 UTC ---
i think everything is fixed in 4.5.0+ ...


[Bug c/52734] New: Incorrect optimization of uClibc sbrk()

2012-03-26 Thread michael at talamasca dot ocis.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52734

 Bug #: 52734
   Summary: Incorrect optimization of uClibc sbrk()
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mich...@talamasca.ocis.net
  Host: i386-pc-linux-gnu
Target: i386-pc-linux-gnu
 Build: i386-pc-linux-gnu


Created attachment 27005
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27005
Simplified code analogous to the sbrk problem

GCC 4.7.0 miscompiles uClibc 0.9.33 producing an unusable library.  The problem
is in uClibc's sbrk() implementation -- GCC optimizes away sbrk's attempt to
save a global variable before a called function changes it.  Basically, that
function (brk) is wrongly treated as an __attribute__((pure)) function.

The above text is to help anyone searching for the bug.  I'm attaching a
distilled case showing the same problem.  The function ccc() is supposed to
return the value of bbb before the second call to aaa(), but when compiled with
-Os it returns the value of bbb afterwards.

This is on i386-pc-linux-uclibc.  GCC 4.6.3 did not have the problem.


[Bug ada/52735] New: Compiler crash with gnat_to_gnu_entity, at ada/gcc-interface/decl.c:4156

2012-03-26 Thread per.sandberg at bredband dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52735

 Bug #: 52735
   Summary: Compiler crash with gnat_to_gnu_entity, at
ada/gcc-interface/decl.c:4156
Classification: Unclassified
   Product: gcc
   Version: 4.6.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: per.sandb...@bredband.net


Created attachment 27006
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27006
Reproducable

The compiler crashes with:
4.6.3 20120306 (Red Hat 4.6.3-2) (i686-redhat-linux-gnu) GCC error:  |
in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:4156  |

To reproduce:
gcc -c markdown.adb

The locations in the sources that triggers is marked with 


[Bug target/52736] New: [4.7 regression] miscompilation: store to aliased __m128d is 8 Bytes off

2012-03-26 Thread kretz at kde dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52736

 Bug #: 52736
   Summary: [4.7 regression] miscompilation: store to aliased
__m128d is 8 Bytes off
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: kr...@kde.org


Created attachment 27007
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27007
testcase

The attached testcase fails when compiled with:
g++ -msse2 -O1 main.cpp

The first aliased store on line 35 stores to the second element in the vector
instead of the fist. The store on line 37 stores to the exact same location in
memory (which is the correct location for line 37).

Slight modification of the example can lead to the compiler optimizing the code
to use half vector loads, in which case it uses the correct one.


[Bug testsuite/52665] scan-assembler output produces wrong FAIL due to matching .ident

2012-03-26 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52665

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||mikestump at comcast dot
   ||net

--- Comment #1 from Bernhard Reutner-Fischer  
2012-03-27 06:43:28 UTC ---
CC'ing testsuite maintainers