[Bug other/54308] [4.8 regression] build regression in 190498 on ppc64/linux: legitimate_indirect_address_p undefined

2012-08-18 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54308

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-08-18
   Target Milestone|--- |4.8.0
Summary|build regression in 190498  |[4.8 regression] build
   |on ppc64/linux: |regression in 190498 on
   |legitimate_indirect_address |ppc64/linux:
   |_p undefined|legitimate_indirect_address
   ||_p undefined
 Ever Confirmed|0   |1

--- Comment #4 from Andreas Schwab  2012-08-18 07:26:35 
UTC ---
legitimate_indirect_address_p is defined inline in rs6000.c, which has
different semantics between C and C++.


[Bug c++/54310] New: Order of operations during overload resolution

2012-08-18 Thread zeratul976 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54310

 Bug #: 54310
   Summary: Order of operations during overload resolution
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zeratul...@hotmail.com


GCC accepts the following code:


template 
struct meta
{
typedef typename T::type type;
};

struct S{};

template 
typename meta::type foo(T, S);

int foo(int, int);  

int main()
{
foo(0, 0);
}


Clang rejects this code with the following error:

test.cpp:4:22: error: type 'int' cannot be used prior to '::' because it has no
members
typedef typename T::type type;
 ^
test.cpp:10:10: note: in instantiation of template class 'meta' requested
here
typename meta::type foo(T, S);
 ^
test.cpp:10:24: note: while substituting deduced template arguments into
function template 'foo' [with T = int]
typename meta::type foo(T, S);
   ^

I believe the code is invalid (and clang's error is correct), for the following
reasons:

1. Template argument deduction should be performed on the template candidate
*before* to discarding it due to a type mismatch for the second parameter
(expected S, got int). Section 13.3.1/7 of the standard says (emphasis mine):
"In each case where a candidate is a function template, candidate function
template specializations are generated using template argument deduction. Those
candidates are *then* handled as candidate functions in the usual way. A given
name can refer to one or more function templates and also to a set of
overloaded non-template functions. In such a case, the candidate functions
generated from each function template are combined with the set of non-template
candidate functions."

2. Template argument deduction on the template candidate should fail with a
hard error (not SFINAE), because the error that occurs (T::type not being valid
for T = int) is not in the immediate context of the function type. (Section
14.8.2/8, emphasis mine: "If a substitution results in an invalid type or
expression, type deduction fails. [...] Only invalid types and expressions *in
the immediate context* of the function type and its template parameter types
can result in a deduction failure. [...]").


GCC does reject the following example:


template 
struct meta
{
typedef typename T::type type;
};

template 
typename meta::type foo(T);

int foo(int);  

int main()
{
foo(0);
}


With the following error:

test.cpp: In instantiation of 'struct meta':
test.cpp:8:24:   required by substitution of 'template typename
meta::type foo(T) [with T = int]'
test.cpp:14:10:   required from here
test.cpp:4:30: error: 'int' is not a class, struct, or union type
 typedef typename T::type type;
  ^

suggesting that GCC already obeys point (2) above, and therefore the problem is
likely to be with point (1).


[Bug target/54300] [4.7/4.8 Regression] Erroneous optimization causes wrong Neon data management

2012-08-18 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54300

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-08-18
   Target Milestone|--- |4.7.2
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2012-08-18 
08:12:11 UTC ---
Your testcase is quite convoluted but it looks you may be violating C
type-based aliasing rules.  Thus, try -fno-strict-aliasing.


[Bug target/54305] [4.8 regression] FAIL: gcc.target/m68k/pr36134.c scan-assembler lea

2012-08-18 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54305

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.8.0


[Bug c++/54311] New: Info about default template arguments in instantiation backtrace

2012-08-18 Thread zeratul976 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54311

 Bug #: 54311
   Summary: Info about default template arguments in instantiation
backtrace
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zeratul...@hotmail.com


Consider the following (invalid) code:


template 
class A {};

template ::type>
class B {};

int main()
{
B b;
}


GCC's error message is as follows:

test.cpp: In function 'int main()':
test.cpp:10:10: error: no type named 'type' in 'class A'
 B b;
  ^
test.cpp:10:10: error: template argument 2 is invalid
test.cpp:10:13: error: invalid type in declaration before ';' token
 B b;
 ^


Someone looking at this backtrace might be confused as to why A is being
instantiated, as the backtrace doesn't show the line that asks for this
instantiation (that line being "typename U = typename A::type"). The
"template argument 2 is invalid" message provides a hint, but I don't think
it's enough.


I think the error message should be changed to the following:

test.cpp: In function 'int main()':
test.cpp:5:38: error: no type named 'type' in 'class A'
  typename U = typename A::type>
  ^
test.cpp:10:10: required from here
 B b;
  ^
test.cpp:10:13: error: invalid type in declaration before ';' token
 B b;
 ^


[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO

2012-08-18 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375

--- Comment #139 from Jan Hubicka  2012-08-18 
09:36:55 UTC ---
oprofile of WPA:
649295   18.2243  lto1 lto1 lto_main()
3412569.5783  lto1 lto1
htab_find_slot_with_hash
1265673.5525  lto1 lto1
do_estimate_growth_1(cgraph_node*, void*)
97142 2.7266  lto1 lto1 htab_expand
89658 2.5165  libc-2.11.1.so   libc-2.11.1.so   _int_malloc
82117 2.3048  lto1 lto1
pointer_map_insert(pointer_map_t*, void const*)
60238 1.6907  lto1 lto1
iterative_hash_hashval_t(unsigned int, unsigned int)
58145 1.6320  lto1 lto1
ggc_internal_alloc_stat(unsigned long, char const*, int, char const*)
53679 1.5067  lto1 lto1
linemap_lookup(line_maps*, unsigned int)
47271 1.3268  lto1 lto1
lto_output_tree(output_block*, tree_node*, bool, bool)
43043 1.2081  lto1 lto1
gt_ggc_mx_lang_tree_node(void*)
42675 1.1978  lto1 lto1
verify_cgraph_node(cgraph_node*)
40609 1.1398  lto1 lto1
streamer_tree_cache_insert_1(streamer_tree_cache_d*, tree_node*, unsigned int*,
bool)
40245 1.1296  lto1 lto1
ggc_marked_p(void const*)
39474 1.1079  libc-2.11.1.so   libc-2.11.1.so   memset
38955 1.0934  libc-2.11.1.so   libc-2.11.1.so  
malloc_consolidate
32085 0.9006  lto1 lto1
streamer_write_uhwi_stream(lto_output_stream*, unsigned long)
31965 0.8972  lto1 lto1
ggc_set_mark(void const*)
31406 0.8815  lto1 lto1
lto_input_tree(lto_input_block*, data_in*)
29213 0.8199  lto1 lto1
streamer_read_tree_bitfields(lto_input_block*, tree_node*)
26846 0.7535  lto1 lto1
hash_pointer
25870 0.7261  libc-2.11.1.so   libc-2.11.1.so   memcpy


We still spend insanely long time in walking types in lto_main (introduced by
Michael's patch)


[Bug c++/54309] [C++11] type alias accessing class template typename

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

Paolo Carlini  changed:

   What|Removed |Added

 CC||dodji at gcc dot gnu.org

--- Comment #3 from Paolo Carlini  2012-08-18 
09:40:35 UTC ---
Maybe Dodji is willing to have a look to this one too.


[Bug lto/54312] New: uniquify_nodes takes 12% of Mozilla LTO build

2012-08-18 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54312

 Bug #: 54312
   Summary: uniquify_nodes takes 12% of Mozilla LTO build
Classification: Unclassified
   Product: gcc
   Version: lto
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hubi...@gcc.gnu.org


uniquify_nodes has quadratic loop removing types from variant lists:
  /* Remove us from our main variant list if we are not the
 variant leader.  */
  if (TYPE_MAIN_VARIANT (t) != t)
{
  tem = TYPE_MAIN_VARIANT (t);
  while (tem && TYPE_NEXT_VARIANT (tem) != t)
tem = TYPE_NEXT_VARIANT (tem);
  if (tem)
TYPE_NEXT_VARIANT (tem) = TYPE_NEXT_VARIANT (t);
  TYPE_NEXT_VARIANT (t) = NULL_TREE;
}
this consume a lot of time building Mozilla (and was introduced by Michael's
patch cleaning up the stream in process). Can't we do a bit better here?

(this was introduced in 4.7)

Honza


[Bug middle-end/54313] New: [4.8 Regression] GCC fails to bootstrap with MALLOC_PERTURB – Segfault in bitmap_obstack_free

2012-08-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54313

 Bug #: 54313
   Summary: [4.8 Regression] GCC fails to bootstrap with
MALLOC_PERTURB – Segfault in bitmap_obstack_free
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: build, ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bur...@gcc.gnu.org
CC: ste...@gcc.gnu.org


If malloc doesn't return nullified memory, bootstrapping fails as soon as the
stage1 compiler is used to build libgcc.


To reproduce: With GLIBC, simply set
  export MALLOC_PERTURB_=163
and on FreeBSD, use jemalloc with junk filling.


Then either bootstrap, which will fail at the first use of the stage1 compiler,
i.e. when building the first libgcc file.


Or if you already have a bootstrapped compiler:

$ cat test.c
int main () {
  return 0;
}
$ gcc -c -O test.c 
test.c: In function 'main':
test.c:3:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,


That fails in:
$ gdb --args ~/projects/gcc-git/gcc-build/gcc/cc1 -O test.c
...

Program received signal SIGSEGV, Segmentation fault.
0x00600f52 in bitmap_obstack_free (map=0x157e5d0) at
/projects/tob/gcc-git/gcc/gcc/bitmap.c:388
388   map->first = (bitmap_element *) map->obstack->heads;

(gdb) p map->obstack
$1 = (bitmap_obstack *) 0xa3a3a3a3a3a3a3a3

(gdb) bt
#0  0x00600f52 in bitmap_obstack_free (map=0x157e5d0) at
/projects/tob/gcc-git/gcc/gcc/bitmap.c:388
#1  0x00ce5f46 in dse_step7 () at
/projects/tob/gcc-git/gcc/gcc/dse.c:3826
#2  rest_of_handle_dse () at /projects/tob/gcc-git/gcc/gcc/dse.c:3891
#3  0x00868fef in execute_one_pass (pass=pass@entry=0x14483a0
) at /projects/tob/gcc-git/gcc/gcc/passes.c:2157
#4  0x008693a5 in execute_pass_list (pass=0x14483a0 ) at
/projects/tob/gcc-git/gcc/gcc/passes.c:2212
#5  0x008693b7 in execute_pass_list (pass=0x1443220
) at /projects/tob/gcc-git/gcc/gcc/passes.c:2213
#6  0x00669b38 in expand_function (node=0x2c192750) at
/projects/tob/gcc-git/gcc/gcc/cgraphunit.c:1609
#7  0x0066b9da in expand_all_functions () at
/projects/tob/gcc-git/gcc/gcc/cgraphunit.c:1714
#8  compile () at /projects/tob/gcc-git/gcc/gcc/cgraphunit.c:2012
#9  0x0066bfd5 in finalize_compilation_unit () at
/projects/tob/gcc-git/gcc/gcc/cgraphunit.c:2089
#10 0x00560390 in c_write_global_declarations () at
/projects/tob/gcc-git/gcc/gcc/c/c-decl.c:10116
#11 0x0090a165 in compile_file () at
/projects/tob/gcc-git/gcc/gcc/toplev.c:560
#12 0x0090bcda in do_compile () at
/projects/tob/gcc-git/gcc/gcc/toplev.c:1863


[Bug c/52991] attribute packed broken on mingw32?

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

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #3 from Mikael Pettersson  2012-08-18 
10:13:20 UTC ---
I see the same breakage with a self-built gcc-4.7.1 for x86_64-w64-mingw32.


[Bug middle-end/54313] [4.8 Regression] GCC fails to bootstrap with MALLOC_PERTURB – Segfault in bitmap_obstack_free

2012-08-18 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54313

Steven Bosscher  changed:

   What|Removed |Added

   Keywords||patch
 Status|UNCONFIRMED |NEW
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-08/msg01240.htm
   ||l
   Last reconfirmed||2012-08-18
 Ever Confirmed|0   |1

--- Comment #1 from Steven Bosscher  2012-08-18 
10:31:44 UTC ---
One of the bitmap is BITMAP_FREE'd when its obstack is already released.


[Bug regression/54314] New: undefined references to 'construction vtable for std::ostream-in-std::basic_ostringstream, std::allocator >'

2012-08-18 Thread vanboxem.ruben at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314

 Bug #: 54314
   Summary: undefined references to 'construction vtable for
std::ostream-in-std::basic_ostringstream, std::allocator >'
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: regression
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vanboxem.ru...@gmail.com


I'm trying to build GCC 4.8 for x86_64-w64-mingw32. I have a cross-compiler but
I cannot build my C++ code with it.

The error is exactly the same as the one detailed here:
http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01142.html

I seem to be unable to detect when exactly this problem shows up, but I run
into it when building PPL-0.12.1 with the Linux->Windows cross-compiler:

/bin/bash ../../libtool  --tag=CXX   --mode=link x86_64-w64-mingw32-g++  -g -O2
-frounding-math  -W -Wall   -o ppl_pips.exe ppl_pips.o ../../src/libppl.la
../../utils/libppl_utils.a
-L/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install/lib -lgmpxx -lgmp 
libtool: link: x86_64-w64-mingw32-g++ -g -O2 -frounding-math -W -Wall -o
ppl_pips.exe ppl_pips.o  ../../src/.libs/libppl.a
-L/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install/lib
../../utils/libppl_utils.a
/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install/lib/libgmpxx.a
/home/ruben/mingw-w64/prereq/x86_64-w64-mingw32/install/lib/libgmp.a
ppl_pips.o: In function `basic_istream':
/home/ruben/mingw-w64/linux64mingw64/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/istream:609:
undefined reference to `construction vtable for
std::istream-in-std::basic_istringstream,
std::allocator >'
/home/ruben/mingw-w64/linux64mingw64/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/istream:609:
undefined reference to `construction vtable for
std::istream-in-std::basic_istringstream,
std::allocator >'
ppl_pips.o: In function `~basic_istream':
/home/ruben/mingw-w64/linux64mingw64/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/istream:106:
undefined reference to `construction vtable for
std::istream-in-std::basic_istringstream,
std::allocator >'
ppl_pips.o: In function `basic_istream':
/home/ruben/mingw-w64/linux64mingw64/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/istream:609:
undefined reference to `construction vtable for
std::istream-in-std::basic_istringstream,
std::allocator >'
/home/ruben/mingw-w64/linux64mingw64/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/istream:609:
undefined reference to `construction vtable for
std::istream-in-std::basic_istringstream,
std::allocator >'
ppl_pips.o:/home/ruben/mingw-w64/linux64mingw64/mingw64/x86_64-w64-mingw32/include/c++/4.8.0/istream:106:
more undefined references to `construction vtable for
std::istream-in-std::basic_istringstream,
std::allocator >' follow
collect2: error: ld returned 1 exit status

This effectively makes g++ useless. I seem to remember only non-debug builds
are affected.


[Bug middle-end/54313] [4.8 Regression] GCC fails to bootstrap with MALLOC_PERTURB – Segfault in bitmap_obstack_free

2012-08-18 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54313

--- Comment #2 from Steven Bosscher  2012-08-18 
10:35:41 UTC ---
Author: steven
Date: Sat Aug 18 10:35:36 2012
New Revision: 190502

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190502
Log:
PR middle-end/54313
* dse.c (dse_step7): Don't free kill_on_calls bitmap, it is
freed when its obstack is release.


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


[Bug middle-end/54313] [4.8 Regression] GCC fails to bootstrap with MALLOC_PERTURB – Segfault in bitmap_obstack_free

2012-08-18 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54313

Steven Bosscher  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Steven Bosscher  2012-08-18 
10:36:20 UTC ---
.


[Bug bootstrap/53912] [4.7/4.8 Regression] bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-08-18 Thread vanboxem.ruben at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53912

Ruben Van Boxem  changed:

   What|Removed |Added

 CC||ktietz at gcc dot gnu.org,
   ||vanboxem.ruben at gmail dot
   ||com

--- Comment #18 from Ruben Van Boxem  
2012-08-18 13:12:54 UTC ---
This is still an issue on current GCC trunk.


[Bug regression/54314] undefined references to 'construction vtable for std::ostream-in-std::basic_ostringstream, std::allocator >'

2012-08-18 Thread jojelino at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314

--- Comment #1 from gee  2012-08-18 14:53:53 UTC ---
bug 53518 also has this problem.
reference type in method argument causes symbol reference of construction
vtable for ***.
so, construction vtable for * symbol must not be marked as weak in PE target.
since PE target cannot handle weak symbol.
or, just reverting the problematic commit would be good.


[Bug middle-end/28831] [4.6/4.7/4.8 Regression] Aggregate copy not elided when using a return value as a pass-by-value parameter

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

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com,
   ||ubizjak at gmail dot com

--- Comment #19 from H.J. Lu  2012-08-18 15:32:41 
UTC ---
With GCC 3.4, -march=i686 will allocate stack and copy f() return
to g().  With newer GCC, the same thing also happens with -march=i386.


[Bug middle-end/28831] [4.6/4.7/4.8 Regression] Aggregate copy not elided when using a return value as a pass-by-value parameter

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

--- Comment #20 from H.J. Lu  2012-08-18 16:10:43 
UTC ---
With -maccumulate-outgoing-args, GCC 3.4 will also make
a copy.


[Bug middle-end/54315] New: Unnecessary copy of return value

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

 Bug #: 54315
   Summary: Unnecessary copy of return value
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com
CC: areg.melikadam...@gmail.com, ubiz...@gmail.com


On Linux/x86-64, I got

[hjl@gnu-6 pr20020]$ cat x.i
union S160
{
  long double a;
};
extern union S160 check160 (void);
extern void checkx160 (union S160);
void
test160 (void)
{
  checkx160 (check160 ());
}
[hjl@gnu-6 pr20020]$ gcc -S -O2 x.i
[hjl@gnu-6 pr20020]$ cat x.s
.file"x.i"
.text
.p2align 4,,15
.globltest160
.typetest160, @function
test160:
.LFB0:
.cfi_startproc
subq$72, %rsp
.cfi_def_cfa_offset 80
callcheck160
fstpt16(%rsp)
movq16(%rsp), %rdx
movq24(%rsp), %rax
movq%rdx, 32(%rsp)
movq%rax, 40(%rsp)
movq%rdx, (%rsp)
movq%rax, 8(%rsp)
callcheckx160
addq$72, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE0:
.sizetest160, .-test160
.ident"GCC: (GNU) 4.7.1 20120629 (Red Hat 4.7.1-1)"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-6 pr20020]$ cat y.i
struct S160
{
  long double a;
};
extern struct S160 check160 (void);
extern void checkx160 (struct S160);
void
test160 (void)
{
  checkx160 (check160 ());
}
[hjl@gnu-6 pr20020]$ gcc -S -O2 y.i
[hjl@gnu-6 pr20020]$ cat y.s
.file"y.i"
.text
.p2align 4,,15
.globltest160
.typetest160, @function
test160:
.LFB0:
.cfi_startproc
subq$24, %rsp
.cfi_def_cfa_offset 32
callcheck160
fstpt(%rsp)
callcheckx160
addq$24, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE0:
.sizetest160, .-test160
.ident"GCC: (GNU) 4.7.1 20120629 (Red Hat 4.7.1-1)"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-6 pr20020]$ 

union causes unnecessary copy of return value. I don't believe
ABI calls for it.


[Bug middle-end/54315] Unnecessary copy of return value

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

--- Comment #1 from H.J. Lu  2012-08-18 17:42:58 
UTC ---
-m32 also causes extra copy:

[hjl@gnu-6 pr54315]$ gcc -S -O2 -m32 y.i
[hjl@gnu-6 pr54315]$ cat y.s
.file"y.i"
.text
.p2align 4,,15
.globltest160
.typetest160, @function
test160:
.LFB0:
.cfi_startproc
subl$44, %esp
.cfi_def_cfa_offset 48
leal16(%esp), %eax
movl%eax, (%esp)
callcheck160
.cfi_def_cfa_offset 44
subl$4, %esp
.cfi_def_cfa_offset 48
fldt16(%esp)
fstpt(%esp)
callcheckx160
addl$44, %esp
.cfi_def_cfa_offset 4
ret
.cfi_endproc
.LFE0:
.sizetest160, .-test160
.ident"GCC: (GNU) 4.7.1 20120629 (Red Hat 4.7.1-1)"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-6 pr54315]$


[Bug middle-end/54315] Unnecessary copy of return value

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

--- Comment #2 from H.J. Lu  2012-08-18 17:45:43 
UTC ---
The difference between -m32 and -m64 is

-  struct S160 D.1692;
+  struct S160 D.1719;

 ;;   basic block 2, loop depth 0
 ;;pred:   ENTRY
-  D.1692 = check160 (); [return slot optimization]
-  checkx160 (D.1692);
+  D.1719 = check160 ();
+  checkx160 (D.1719);
   return;
 ;;succ:   EXIT

"return slot optimization" generates extra copy.


[Bug c++/54316] New: [C++11] move constructor for string_stream

2012-08-18 Thread lundberj at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316

 Bug #: 54316
   Summary: [C++11] move constructor for string_stream
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lundb...@gmail.com


[Bug target/54308] [4.8 regression] build regression in 190498 on ppc64/linux: legitimate_indirect_address_p undefined

2012-08-18 Thread gary at intrepid dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54308

--- Comment #5 from Gary Funck  2012-08-18 18:39:42 
UTC ---
(In reply to comment #1)
> (Note, apparent s/4.2.1/4.1.2/g in initial description.)
> 
> I'd suggest updating to just a later gcc build, if you can find *only slightly
> newer* rpm:s; as for a x86_64-linux F 8 with gcc-4.1.2-33 ("gcc (GCC) 4.1.2
> 20070925 (Red Hat 4.1.2-33)"), I'm well into stage 1 for r190498.

FYI, the failing system has Redhat Release 8 (circa 2002).  Fedocra Core 8
didn't come out until circa 2007.  Thus, it would be surprising that an FC8 RPM
will build on the much older RH8 system.


[Bug c++/54316] [C++11] move constructor for string_stream

2012-08-18 Thread lundberj at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316

Johan Lundberg  changed:

   What|Removed |Added

 CC||lundberj at gmail dot com
 Depends on||53626

--- Comment #1 from Johan Lundberg  2012-08-18 
18:42:09 UTC ---
std::stringstream should be move constructable but there is no move constructor
declared in include/std/sstream. 

This missing C++11 feature is dependent on basic_ios
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53626#add_comment) but additional
work seem to be required for stringsteam and other dependent classes.

The relevant standard section is 27.8.5 (Class template basic_stringstream).

  regards J. 

//Minimal example:
#include 
#include 
std::stringstream getss(){
   std::stringstream q;
   return std::move(q);
}

compile_testtmp.cpp: In function ‘std::stringstream getss()’:
compile_testtmp.cpp:7:22: error: use of deleted function
‘std::basic_stringstream::basic_stringstream(const
std::basic_stringstream&)’
In file included from compile_testtmp.cpp:2:0:
/usr/include/c++/4.7/sstream:485:11: note:
‘std::basic_stringstream::basic_stringstream(const
std::basic_stringstream&)’ is implicitly deleted because the default
definition would be ill-formed:
/usr/include/c++/4.7/sstream:485:11: error: use of deleted function
‘std::basic_iostream::basic_iostream(const std::basic_iostream&)’
In file included from /usr/include/c++/4.7/sstream:39:0,
 from compile_testtmp.cpp:2:
/usr/include/c++/4.7/istream:789:11: note:
‘std::basic_iostream::basic_iostream(const std::basic_iostream&)’
is implicitly deleted because the default definition would be ill-formed:
/usr/include/c++/4.7/istream:789:11: error: use of deleted function
‘std::basic_istream::basic_istream(const std::basic_istream&)’
/usr/include/c++/4.7/istream:56:11: note:
‘std::basic_istream::basic_istream(const std::basic_istream&)’ is
implicitly deleted because the default definition would be ill-formed:
/usr/include/c++/4.7/istream:56:11: error: use of deleted function
‘std::basic_ios::basic_ios(const std::basic_ios&)’

... and further similar (~50 lines).


[Bug c++/39813] improve __PRETTY_FUNCTION__ for templated methos

2012-08-18 Thread lundberj at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39813

Johan Lundberg  changed:

   What|Removed |Added

 CC||lundberj at gmail dot com

--- Comment #10 from Johan Lundberg  2012-08-18 
18:57:30 UTC ---
I confirm this issue with gcc 4.7.

> g++ outputs:
>   void A::fn() [with T = int]
>   void B::fn() [with T = int]
> 
> I think that the latter should output:
>   void B::fn() [with T = int]


[Bug target/54308] [4.8 regression] build regression in 190498 on ppc64/linux: legitimate_indirect_address_p undefined

2012-08-18 Thread PHHargrove at lbl dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54308

--- Comment #6 from Paul H. Hargrove  2012-08-18 
19:05:19 UTC ---
(In reply to comment #5 by Gary Funck)
[...]
> FYI, the failing system has Redhat Release 8 (circa 2002).  Fedocra Core 8
> didn't come out until circa 2007.  Thus, it would be surprising that an FC8 
> RPM
> will build on the much older RH8 system.

Gary,

You are confusing my two failing systems.
This bug report is for a ppc64 system running FC6, making the F8 suggestion
reasonable.
The RH8 system is an x86 and only made it to the discuss list, not a full bug
report.


H-P,

I was unable to build 4.1.2-27.fc7 from the SRPM.
So, I've given up on finding the lowest supported compiler.


-Paul


[Bug c++/20313] in diagnostic is confusing

2012-08-18 Thread lundberj at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20313

Johan Lundberg  changed:

   What|Removed |Added

 CC||lundberj at gmail dot com

--- Comment #5 from Johan Lundberg  2012-08-18 
19:07:22 UTC ---
(In reply to comment #4)
> Wow - a blast from the past! FWIW, I still think that the "" is
> confusing. That 4.6 drops one of the messages is an improvement though...

Blast from the past again, gcc 4.7 gives the same result as 4.6


[Bug c++/54316] [C++11] move constructor for string_stream

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

Paolo Carlini  changed:

   What|Removed |Added

 CC|lundberj at gmail dot com   |

--- Comment #2 from Paolo Carlini  2012-08-18 
20:58:35 UTC ---
Many C++11 bits having to do with iostream and even more those having to do
with std::string are quite delicate in terms of ABI, thus the implementation is
being delayed to when we globally break the ABI. It's known.


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #16 from Denis Kolesnik  
2012-08-18 21:16:21 UTC ---
(In reply to comment #14)
> Can you stop reopening this bug?  The problem again is that you are writing
> past the array bounds and anytime that happens it is undefined behavior. 
> Please fix the array bounds issue and you will see it works now.

Andrew I did fix my problem, but the program language standard of "C" is
violated.
That is why I consider it is as a bug.

Where I'm wrong here?


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #8 from Denis Kolesnik  2012-08-18 
21:19:51 UTC ---
my command line for compile:

c++ -I"D:\Program Files\PostgreSQL\9.1\include" -L"D:\Program
Files\PostgreSQL\9.1\lib" -lpq -o %application_file% %application_file%.cpp
-Wl,--subsystem,windows -lgdi32 -lcomctl32 -D_WIN32_IE=0x0300 -save-temps

-save-temps - this option I use to have all files included(assembler source,
etc...)


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #17 from Denis Kolesnik  
2012-08-18 21:28:56 UTC ---
(In reply to comment #11)
> Also, you declare SQL_date_begin[10] then fill it with 11 characters
> (-MM-DD plus the numm terminator) and do the same with SQL_date_end
> 
> This is horrible, horrible code and should be deleted immediately.
> 
> (In reply to comment #5)
> > it should work without problems, because of programming language syntax 
> > which
> > is a standart.
> > But it works so, that SQL1 partially overwrites value of SQL_date_begin and
> > values are
> > not such as expected.
> 
> Please check the standard before arguing about it. The C standard states that
> for the functions in  "If an array is accessed beyond the end of an
> object, the behavior is undefined."  
> 
> To understand undefined behaviour see:
> http://en.wikipedia.org/wiki/Undefined_behavior
> 
> 
> > I never heard, that the "C" language is outdated. The "C++" is just another
> > standart which includes
> > the syntax of "C".
> 
> Noone said it's outdated, what on earth are you talking about?
> 
> > So I consider it is as an GCC error which should be fixed, also because all
> > standart libraries
> > come along with GCC.
> 
> No, the strcat and strcpy functions come from the C library provided by your
> OS, they do not come from GCC. If you still believe there is a bug then maybe
> you should report it to Microsoft instead.

thank you for understandable answer!


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #9 from Denis Kolesnik  2012-08-18 
21:41:05 UTC ---
(In reply to comment #6)
> Why is this marked "enhancement" ?
> 
> Is this the same issue as PR 54213 ? If so please close that one.
> 
> What exactly is your question and why do you think it's anything to do with
> GCC?

I want to be last names sorted in a combobox alphabetically and use for it
"...order by str_last_name...".

Then I use one line returning SQL request, which helps to determine with wich
table id it is(by using SQL "...offset..." and combobox item number) and data
represented with table id not equals with id returned by the second SQL query.

The problem is solved if I do not use "...order by str_last_name..." but it is
not convenient to have data unsorted...


[Bug c++/54316] [C++11] move constructor for string_stream

2012-08-18 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316

--- Comment #3 from Jonathan Wakely  2012-08-18 
21:43:52 UTC ---
(In reply to comment #2)
> It's known.

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


[Bug fortran/39290] Subroutine/function ambiguity in generics

2012-08-18 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39290

--- Comment #4 from Mikael Morin  2012-08-18 
21:56:02 UTC ---
(In reply to comment #3)
> Thus, I concur that it seems to be fixed. However, one could consider to
> include the two test cases of the IR in the testsuite - besides the invalid 
> one
> of comment 0, the valid one of question 2 (see IR).

Actually, the valid test doesn't work as `qc' instead of `qr' is called in the
first call. Testcase:

! { dg-do run }
!
! PR fortran/39290
! Subroutine/function ambiguity in generics.
!
 function ff()
   ff = 4
 end function ff

 function cc()
   cc = (5,6)
 end function cc

 subroutine qr(f)
   real, external :: f
   complex c
   common /a/ r, c
   r = f() 
 end subroutine

 subroutine qc(f)
   complex, external :: f
   complex c
   common /a/ r, c
   c = f()
 end subroutine

 module m
   interface q
 subroutine qr(f)
   real, external :: f
 end subroutine
 subroutine qc(f)
   complex, external :: f
 end subroutine
   end interface q
 end module m

 program main
   use m
   external ff, cc
   complex cc, c
   common /a/ r, c
   r = 1
   c = (2, 3)
   call q(ff)
   !print *, r
   if (r /=  4   ) call abort
   !print *, c
   if (c /= (2,3)) call abort
   call q(cc)
   !print *, r
   if (r /=  4   ) call abort
   !print *, c
   if (c /= (5,6)) call abort
 end


[Bug fortran/39290] Subroutine/function ambiguity in generics

2012-08-18 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39290

--- Comment #5 from Mikael Morin  2012-08-18 
22:00:20 UTC ---
Author: mikael
Date: Sat Aug 18 22:00:10 2012
New Revision: 190504

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190504
Log:
Add the working testcase from PR fortran/39290.

testsuite/
PR fortran/39290
* gfortran.dg/interface_37.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/interface_37.f90
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

--- Comment #18 from Denis Kolesnik  
2012-08-18 22:07:20 UTC ---
(In reply to comment #10)
> Your bug report is useless, you have not provided the information requested at
> http://gcc.gnu.org/bugs/ so it cannot be compiled or verified, and your
> description of the problem is hard to follow.
> 
> The problem is that your array is too small for the data you write to the
> array. This has nothing to do with the order of declarations.
> 
> You declare SQL1[150] then you call
> 
> strcat(SQL1,"select id,' ', to_char(dt_date,'DD.MM.'),' ',int_from,'
> ','>',' ',int_to,' ',cur_amount,' ',(select str_comment from
> tbl_dic_payment_types where tbl_dic_payment_types.id=tbl_bills.int_type) as
> type,' ', (select case when int_type=1 then 'business' else 'personal' end 
> from
> tbl_bills_entity_type where tbl_bills_entity_type.int_bill=tbl_bills.id) as
> test2 from tbl_bills ");
> 
> That's more than 150 characters. Your program has a bug, not GCC.

I'm sorry, you are right! The problem was inside my program.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #10 from Denis Kolesnik  
2012-08-18 22:09:22 UTC ---
I'm sorry. That is my falut and the problem was that I overflowed variables
size causing undefined behaviour. Now I kwon what it is.


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

--- Comment #19 from Denis Kolesnik  
2012-08-18 22:11:52 UTC ---
I'm sorry it is my falut, which caused undefined behaviour. I declared small
sized variables.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #11 from Denis Kolesnik  
2012-08-18 22:13:31 UTC ---
(In reply to comment #10)
> I'm sorry. That is my falut and the problem was that I overflowed variables
> size causing undefined behaviour. Now I kwon what it is.

sorry, this comment was for the bug 54180


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #12 from Denis Kolesnik  
2012-08-18 22:15:40 UTC ---
> > What exactly is your question and why do you think it's anything to do with
> > GCC?

that is one of my questions. Whether it is a GCC bug or PstgreSQL. Or even
againg my errors in my code.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE
   Severity|enhancement |normal

--- Comment #13 from Jonathan Wakely  2012-08-18 
22:18:28 UTC ---
This line contains a bug:

strcpy(SQL1,"select id, ' ', regexp_replace(str_last_name,' ','') as lastname,
' ', regexp_replace(str_first_name,' ','') as firstname, ' ', age(dt_birth) as
age from tbl_owners_individual;");

SQL1 only has capacity for 150 chars, but you write more than 170 to it. This
is a serious bug in your program (not in GCC or postgresql).

When you use the "order by" clause you write even more characters to the array,
which is still a bug.

Either learn to use dynamically-allocated memory or ensure your arrays are big
enough to hold the strings you write to them.

This is the same issue as PR 54180

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


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

--- Comment #20 from Jonathan Wakely  2012-08-18 
22:18:28 UTC ---
*** Bug 54214 has been marked as a duplicate of this bug. ***


[Bug middle-end/53823] [4.8 Regression] FAIL: gcc.c-torture/execute/930921-1.c execution at -O0 and -O1

2012-08-18 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53823

--- Comment #24 from John David Anglin  2012-08-18 
23:16:57 UTC ---
Author: danglin
Date: Sat Aug 18 23:16:53 2012
New Revision: 190505

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190505
Log:
PR middle-end/53823
* expmed.c (expand_mult): Skip synth_mult for negative coefficients
if the mode is larger than a wide int and it is too costly to multiply
by a positive multiplier and negate the result.


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


[Bug c++/51501] decltype over-agressive SFINAE

2012-08-18 Thread dave at boostpro dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501

--- Comment #6 from Dave Abrahams  2012-08-18 
23:18:21 UTC ---
Jason, are you submitting (or is there already) an issue for this?


[Bug middle-end/53823] [4.8 Regression] FAIL: gcc.c-torture/execute/930921-1.c execution at -O0 and -O1

2012-08-18 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53823

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #25 from John David Anglin  2012-08-18 
23:32:37 UTC ---
Although I've got another multiplication issue to resolve, it
was not introduced by the rearrangment of expand_mult.  So, I'm going
to start a new PR.


[Bug tree-optimization/54317] New: [4.8 Regression] FAIL: c45532m c45532n c45532o c45532p

2012-08-18 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54317

 Bug #: 54317
   Summary: [4.8 Regression] FAIL: c45532m c45532n c45532o c45532p
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dang...@gcc.gnu.org
  Host: hppa*-*-* (32-bit)
Target: hppa*-*-* (32-bit)
 Build: hppa*-*-* (32-bit)


All fails are similar:

BUILD c45532m.adb
gnatmake --GCC="/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/"
-gnatws -O2 -I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532m.adb
-largs
 --GCC="/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/"
/test/gnu/gcc/objdir/gcc/xgcc -c -B/test/gnu/gcc/objdir/gcc/ -gnatws -O2
-I/test
/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532m.adbgnatbind
-I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support -x c45532m.alignatlink
c45532m.ali -O2 --GCC=/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/obj
dir/gcc/RUN c45532m

,.,. C45532M ACATS 2.5 12-08-17 21:15:16 C45532M FIXED POINT OPERATOR "*".
   * C45532M RESULT OF "*" OUTSIDE RESULT MODEL INTERVAL WHEN A, B, AND 
A * B ARE ALL MODEL NUMBERS.
   * C45532M RESULT OF "*" OUTSIDE RESULT MODEL INTERVAL WHEN A, B MODEL
NUMBERS A * B NOT.
   * C45532M RESULT OF "*" OUTSIDE RESULT MODEL INTERVAL WHEN USING NO
MODEL NUMBERS.
 C45532M FAILED .
FAIL:   c45532m

BUILD c45532n.adb
gnatmake --GCC="/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/"
-gnatws -O2 -I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532n.adb
-largs --GCC="/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/"
/test/gnu/gcc/objdir/gcc/xgcc -c -B/test/gnu/gcc/objdir/gcc/ -gnatws -O2
-I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532n.adb
gnatbind -I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support -x c45532n.ali
gnatlink c45532n.ali -O2 --GCC=/test/gnu/gcc/objdir/gcc/xgcc
-B/test/gnu/gcc/objdir/gcc/
RUN c45532n

,.,. C45532N ACATS 2.5 12-08-17 21:15:20
 C45532N FIXED POINT OPERATOR "/".
   * C45532N RESULT OF "/" OUTSIDE RESULT MODEL INTERVAL WHEN A, B, AND 
A / B ARE ALL MODEL NUMBERS.
   * C45532N RESULT OF "/" OUTSIDE RESULT MODEL INTERVAL WHEN USING NO
MODEL NUMBERS.
 C45532N FAILED .
FAIL:   c45532n

BUILD c45532o.adb
gnatmake --GCC="/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/"
-gnatws -O2 -I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532o.adb
-largs --GCC="/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/"
/test/gnu/gcc/objdir/gcc/xgcc -c -B/test/gnu/gcc/objdir/gcc/ -gnatws -O2
-I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532o.adb
gnatbind -I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support -x c45532o.ali
gnatlink c45532o.ali -O2 --GCC=/test/gnu/gcc/objdir/gcc/xgcc
-B/test/gnu/gcc/objdir/gcc/
RUN c45532o

,.,. C45532O ACATS 2.5 12-08-17 21:15:24
 C45532O FIXED POINT OPERATOR "*".
   * C45532O RESULT OF "*" OUTSIDE RESULT MODEL INTERVAL WHEN A, B, AND 
A * B ARE ALL MODEL NUMBERS.
   * C45532O RESULT OF "*" OUTSIDE RESULT MODEL INTERVAL WHEN A, B MODEL
NUMBERS A * B NOT.
   * C45532O RESULT OF "*" OUTSIDE RESULT MODEL INTERVAL WHEN USING NO
MODEL NUMBERS.
 C45532O FAILED .
FAIL:   c45532o

BUILD c45532p.adbgnatmake --GCC="/test/gnu/gcc/objdir/gcc/xgcc
-B/test/gnu/gcc/objdir/gcc/" -gnat
ws -O2 -I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532p.adb
-largs --GCC="/test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/"
/test/gnu/gcc/objdir/gcc/xgcc -c -B/test/gnu/gcc/objdir/gcc/ -gnatws -O2
-I/test
/gnu/gcc/objdir/gcc/testsuite/ada/acats/support c45532p.adbgnatbind
-I/test/gnu/gcc/objdir/gcc/testsuite/ada/acats/support -x c45532p.ali
gnatlink c45532p.ali -O2 --GCC=/test/gnu/gcc/objdir/gcc/xgcc
-B/test/gnu/gcc/obj
dir/gcc/
RUN c45532p

,.,. C45532P ACATS 2.5 12-08-17 21:15:28
 C45532P FIXED POINT OPERATOR "/".
   * C45532P RESULT OF "/" OUTSIDE RESULT MODEL INTERVAL WHEN A, B, AND 
A / B ARE ALL MODEL NUMBERS.
   * C45532P RESULT OF "/" OUTSIDE RESULT MODEL INTERVAL WHEN USING NO
MODEL NUMBERS.
 C45532P FAILED .FAIL:   c45532p

Introduced in revision 189861:

2012-07-25 Marc Glisse 

PR tree-optimization/30318
* tree-vrp.c (extract_range_from_binary_expr_1) [PLUS_EXPR]:
Handle __int128.
[MINUS_EXPR]: Merge with PLUS_EXPR.


[Bug middle-end/53420] [4.8 Regression] ICE in iterative_hash_expr, at tree.c:7039

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

--- Comment #4 from dave.anglin at bell dot net 2012-08-18 23:50:21 UTC ---
On 15-Aug-12, at 4:16 AM, jakub at gcc dot gnu.org wrote:

> Can you still reproduce it?


My HP-UX 11.00 box had a disk failure a couple of weeks ago, so I can't
reproduce it at the moment.  I only saw this problem with 11.00.

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


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|DUPLICATE   |

--- Comment #14 from Denis Kolesnik  
2012-08-19 00:44:57 UTC ---
(In reply to comment #13)
> This line contains a bug:
> 
> strcpy(SQL1,"select id, ' ', regexp_replace(str_last_name,' ','') as lastname,
> ' ', regexp_replace(str_first_name,' ','') as firstname, ' ', age(dt_birth) as
> age from tbl_owners_individual;");
> 
> SQL1 only has capacity for 150 chars, but you write more than 170 to it. This
> is a serious bug in your program (not in GCC or postgresql).
> 
> When you use the "order by" clause you write even more characters to the 
> array,
> which is still a bug.
> 
> Either learn to use dynamically-allocated memory or ensure your arrays are big
> enough to hold the strings you write to them.
> 
> This is the same issue as PR 54180
> 
> *** This bug has been marked as a duplicate of bug 54180 ***

now my CHAR SQL1[350] as you see is 350 characters long, but the problem is the
same:

if I choose a filed from the combobox with the id 1 in the database table
the second query, which also ends with the clause "...order by
str_last_name..."
returns the field with the id 111(if I remember correct), but should with 1.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #15 from Denis Kolesnik  
2012-08-19 00:45:56 UTC ---
(In reply to comment #13)
> This line contains a bug:
> 
> strcpy(SQL1,"select id, ' ', regexp_replace(str_last_name,' ','') as lastname,
> ' ', regexp_replace(str_first_name,' ','') as firstname, ' ', age(dt_birth) as
> age from tbl_owners_individual;");
> 
> SQL1 only has capacity for 150 chars, but you write more than 170 to it. This
> is a serious bug in your program (not in GCC or postgresql).
> 
> When you use the "order by" clause you write even more characters to the 
> array,
> which is still a bug.
> 
> Either learn to use dynamically-allocated memory or ensure your arrays are big
> enough to hold the strings you write to them.
> 
> This is the same issue as PR 54180
> 
> *** This bug has been marked as a duplicate of bug 54180 ***

now my CHAR SQL1[350] as you see is 350 characters long, but the problem is the
same:

if I choose a field from the combobox with the id 1 in the database table
the second query, which also ends with the clause "...order by
str_last_name..."
returns the field with the id 111(if I remember correct), but should with 1.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik  changed:

   What|Removed |Added

  Attachment #27972|0   |1
is obsolete||

--- Comment #16 from Denis Kolesnik  
2012-08-19 00:51:37 UTC ---
Created attachment 28047
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28047
a newer c++ source file


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #17 from Denis Kolesnik  
2012-08-19 00:54:19 UTC ---
(In reply to comment #10)
> I'm sorry. That is my falut and the problem was that I overflowed variables
> size causing undefined behaviour. Now I kwon what it is.

sorry for my bad english - know


[Bug c++/54318] New: [C++11] Bogus "template instantiation depth exceeds maximum" error + segfault

2012-08-18 Thread zeratul976 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54318

 Bug #: 54318
   Summary: [C++11] Bogus "template instantiation depth exceeds
maximum" error + segfault
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zeratul...@hotmail.com


The following code:


template 
struct wrapped
{
typedef T type;
};

template 
typename T::type unwrap1(T);

int unwrap(int);

template 
auto unwrap(T t) -> decltype(unwrap(unwrap1(t)))
{
return unwrap(unwrap1(t));
}

int main()
{
unwrap(wrapped>());
}


Seems to produce an infinite loop in GCC, as it displays the same error message
over and over again, and eventualy segfaults.

Here is the error message:

test.cpp:13:6: error: template instantiation depth exceeds maximum of 900 (use
-ftemplate-depth= to increase the maximum) substituting 'template
typename T::type unwrap1(T) [with T = wrapped >]'
 auto unwrap(T t) -> decltype(unwrap(unwrap1(t)))
  ^
test.cpp:13:6:   recursively required by substitution of 'template
decltype (unwrap(unwrap1(t))) unwrap(T) [with T = wrapped]'
test.cpp:13:6:   required by substitution of 'template decltype
(unwrap(unwrap1(t))) unwrap(T) [with T = wrapped]'
test.cpp:15:29:   template instantiation depth exceeds maximum of 900 (use
-ftemplate-depth= to increase the maximum) substituting 'template
typename T::type unwrap1(T) [with T = wrapped >]'

The last 3 lines are repeated thousands of times until finally:

g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


I believe the code is valid. Clang compiles it without errors.


[Bug target/28896] -fstack-limit-symbol and m68k and non 68020

2012-08-18 Thread baker at usgs dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28896

Larry Baker  changed:

   What|Removed |Added

  Attachment #28024|0   |1
is obsolete||

--- Comment #17 from Larry Baker  2012-08-19 03:24:24 
UTC ---
Created attachment 28048
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28048
Patch for trunk version 2012-08-12 of gcc/config/m68k/m68k.md

Change Bcc branch target from .+2 to .+6.


[Bug c++/54319] New: Assignment to rvalue

2012-08-18 Thread aschepler at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54319

 Bug #: 54319
   Summary: Assignment to rvalue
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: aschep...@gmail.com


g++ seems to think "A = B" is a prvalue if expression A is a prvalue of a class
type with no members.  Example code:

-

template
struct is_same {
  static const bool value = false;
};

template
struct is_same {
  static const bool value = true;
};

struct X {};

struct Y { int m; };

void f() {
  static_assert(is_same::value,
"Y assignment does not result in lvalue");
  static_assert(is_same::value,
"X assignment does not result in lvalue");
}

-

g++ -std=c++0x -c rval_assign.cpp
rval_assign3.cpp: In function ‘void f()’:
rval_assign3.cpp:18:3: error: static assertion failed: X assignment does not
result in lvalue

-

The difference in behavior between X and Y is surprising, since both are POD.

Although assigning to a prvalue is questionable practice, it's allowed in this
case and the assignment expression is an lvalue because of 12.8 paragraph 22:

  The implicitly-declared move assignment operator for a class X will have the
form
  X& X::operator=(X&&);

-

g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586
--with-tune=generic --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-2)


[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO

2012-08-18 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375

--- Comment #140 from Jan Hubicka  2012-08-19 
05:55:26 UTC ---
Author: hubicka
Date: Sun Aug 19 05:55:20 2012
New Revision: 190509

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190509
Log:

PR lto/45375
* ipa-inline.c (want_inline_small_function_p): Bypass
inline limits for hinted functions.
(edge_badness): Dump hints; decrease badness for hinted funcitons.
* ipa-inline.h (enum inline_hints_vals): New enum.
(inline_hints): New type.
(edge_growth_cache_entry): Add hints.
(dump_inline_summary): Update.
(dump_inline_hints): Declare.
(do_estimate_edge_hints): Declare.
(estimate_edge_hints): New inline function.
(reset_edge_growth_cache): Update.
* predict.c (cgraph_maybe_hot_edge_p): Do not ice on indirect edges.
* ipa-inline-analysis.c (dump_inline_hints): New function.
(estimate_edge_devirt_benefit): Return true when function should be
hinted.
(estimate_calls_size_and_time): New hints argument; set it when
devritualization happens.
(estimate_node_size_and_time): New hints argument.
(do_estimate_edge_time): Cache hints.
(do_estimate_edge_growth): Update.
(do_estimate_edge_hints): New function

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline-analysis.c
trunk/gcc/ipa-inline.c
trunk/gcc/ipa-inline.h
trunk/gcc/predict.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/ipa/iinline-1.c