[Bug c++/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2010-07-28 Thread siarhei dot siamashka at gmail dot com


--- Comment #4 from siarhei dot siamashka at gmail dot com  2010-07-28 
07:16 ---
Could not reproduce the problem with gcc 4.3.5

Disassembly of pr45070.o:

000c :
   c:   e92d401fpush{r0, r1, r2, r3, r4, lr}
  10:   e89cldm r0, {r2, r3}
  14:   e1a04000mov r4, r0
  18:   e1520003cmp r2, r3
  1c:   b3a03000movlt   r3, #0
  20:   ba14blt 78 
  24:   e5903008ldr r3, [r0, #8]
  28:   e353cmp r3, #0
  2c:   0a0ebeq 6c 
  30:   e3a03000mov r3, #0
  34:   e5803008str r3, [r0, #8]
  38:   e284add r0, r0, #4
  3c:   ebefbl  0 
  40:   e1a4mov r0, r4
  44:   ebf0bl  c 
  48:   e1a00800lsl r0, r0, #16
  4c:   e1a00840asr r0, r0, #16
  50:   e5cdstrbr0, [sp]
  54:   e1a00420lsr r0, r0, #8
  58:   e5cd0001strbr0, [sp, #1]
  5c:   e1dd30b0ldrhr3, [sp]
  60:   e1cd30bcstrhr3, [sp, #12]
  64:   e1dd30bcldrhr3, [sp, #12]
  68:   ea02b   78 
  6c:   e3a03001mov r3, #1
  70:   e5803008str r3, [r0, #8]
  74:   e59f3010ldr r3, [pc, #16]   ; 8c 
  78:   e1cd30bcstrhr3, [sp, #12]
  7c:   e5dd300cldrbr3, [sp, #12]
  80:   e5dd000dldrbr0, [sp, #13]
  84:   e1830400orr r0, r3, r0, lsl #8
  88:   e8bd801fpop {r0, r1, r2, r3, r4, pc}

^^^ POP instruction just overwrites return value in r0 register here

  8c:   .word   0x

Looks like the function gets treated as if it were returning 'void'.


-- 

siarhei dot siamashka at gmail dot com changed:

   What|Removed |Added

   Keywords||wrong-code
  Known to fail||4.5.0
  Known to work||4.3.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070



[Bug c++/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2010-07-28 Thread siarhei dot siamashka at gmail dot com


--- Comment #5 from siarhei dot siamashka at gmail dot com  2010-07-28 
07:18 ---
The disassembly chunk from the comment above was from gcc 4.5.0, using '-Os
-match=armv5te' options.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070



[Bug target/45000] RX signed extened unsigned char or short return value.

2010-07-28 Thread kazuhiro dot inaoka dot ud at renesas dot com


--- Comment #2 from kazuhiro dot inaoka dot ud at renesas dot com  
2010-07-28 07:19 ---
(In reply to comment #1)
Hi Nick

Thank you for your reply.

Your example is OK. 
But I'm not clear.

> extension being performed.  Eg:
>  int bar (int a) { return a < func(); }
If the func() is external function, output code is the following.
_bar:
 push.l r7
 mov.L  r1, r7
 bsr_func
 mouv.B r1, r1
 cmpr7, r1
 scgt.L r1
 rtsd   #4, r7-r7

If the return value is zero exteneded,
"movu.B r1, r1" code can be removed.

Is the explanation san integer conversion rank?
> PS. See section 6.3.1.1 of the ISO C99 standard for more information about 
> this
> behaviour

I think that my request is depend on rx cpu target like sh, m32r not m32c. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45000



[Bug fortran/44945] [4.6 Regression] Wrong decl for module vars / FAIL: gfortran.dg/char_array_structure_constructor.f90

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #26 from burnus at gcc dot gnu dot org  2010-07-28 07:41 ---
I expect a similar problem for derived types from modules which are external -
in that case the place to modify would be gfc_get_derived_type -- cf. PR 45077.
Also here, the proper gsym will not be available if the MODULE is only
available via the .mod.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945



[Bug fortran/45077] ICE with -fwhole-file in fold_convert_loc, at fold-const.c:2021

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2010-07-28 07:43 ---
Patch. Note: It still fails if one moves "module iso_red" into a separate file.
Cf. PR 44945. The reason is that then "gsym" will come up as NULL and every
module user uses a different decl.

Index: trans-types.c
===
--- trans-types.c   (revision 162617)
+++ trans-types.c   (working copy)
@@ -1994,6 +1994,8 @@ gfc_get_derived_type (gfc_symbol * deriv
  gfc_symbol *s;
  s = NULL;
  gfc_find_symbol (derived->name, gsym->ns, 0, &s);
+  if (s && !s->backend_decl)
+s->backend_decl = gfc_get_derived_type (s);
  if (s && s->backend_decl)
{
  gfc_copy_dt_decls_ifequal (s, derived, true);


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-28 07:43:55
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45077



[Bug middle-end/44993] [4.6 regression] sparc64-linux bootstrap broken

2010-07-28 Thread ebotcazou at gcc dot gnu dot org


--- Comment #4 from ebotcazou at gcc dot gnu dot org  2010-07-28 07:44 
---
Subject: Bug 44993

Author: ebotcazou
Date: Wed Jul 28 07:44:34 2010
New Revision: 162618

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162618
Log:
PR middle-end/44790
PR middle-end/44993
* expr.c (expand_expr_real_1) : Revert latest change.  Make
sure the base has address_mode before adding the offset.

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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44993



[Bug middle-end/44790] [4.6 Regression] Bootstrap fails after MEM-REF merge

2010-07-28 Thread ebotcazou at gcc dot gnu dot org


--- Comment #8 from ebotcazou at gcc dot gnu dot org  2010-07-28 07:44 
---
Subject: Bug 44790

Author: ebotcazou
Date: Wed Jul 28 07:44:34 2010
New Revision: 162618

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162618
Log:
PR middle-end/44790
PR middle-end/44993
* expr.c (expand_expr_real_1) : Revert latest change.  Make
sure the base has address_mode before adding the offset.

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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44790



[Bug middle-end/44993] [4.6 regression] sparc64-linux bootstrap broken

2010-07-28 Thread ebotcazou at gcc dot gnu dot org


--- Comment #5 from ebotcazou at gcc dot gnu dot org  2010-07-28 07:47 
---
Thanks for reporting the problem.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44993



[Bug middle-end/45097] ICE: gimple check: expected gimple_assign(error_mark), have gimple_phi() in gimple_assign_lhs, at gimple.h:1724

2010-07-28 Thread ramana at gcc dot gnu dot org


--- Comment #2 from ramana at gcc dot gnu dot org  2010-07-28 08:03 ---
I've been looking at this with respect to trunk bootstrapping on armv7a-linux
platforms.

http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02102.html

See if the patches in that trail fix your bug.


-- 

ramana at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-28 08:03:17
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45097



[Bug c/45100] New: internal compiler error: Segmentation fault (at -O3)

2010-07-28 Thread morandini at aero dot polimi dot it
gcc version:

ma...@pc-31c:~/TTT/GccTestcaseReduction> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/marco/local/gcc-4.5.0/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-threads=posix
--prefix=/home/marco/local/gcc-4.5.0 --enable-shared --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --with-cpu=opteron
--enable-languages=c,c++,fortran --with-mpfr=/home/marco/local/mpfr-2.4.2
--with-mpc=/home/marco/local/mpc-0.8.1 --enable-gold --enable-lto
Thread model: posix
gcc version 4.5.0 (GCC) 

--

How to reproduce:

gcc -O3 -c node_refine.i


-- 
   Summary: internal compiler error: Segmentation fault (at -O3)
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: morandini at aero dot polimi dot it
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45100



[Bug c/45100] internal compiler error: Segmentation fault (at -O3)

2010-07-28 Thread morandini at aero dot polimi dot it


--- Comment #1 from morandini at aero dot polimi dot it  2010-07-28 08:07 
---
Created an attachment (id=21329)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21329&action=view)
reduced testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45100



[Bug middle-end/45097] ICE: gimple check: expected gimple_assign(error_mark), have gimple_phi() in gimple_assign_lhs, at gimple.h:1724

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #3 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 08:11 
---
Ramana,

I confirmed that your patch fixes this PR moments before you posted you
comment.  It's a dup of 45067.

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


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45097



[Bug bootstrap/45067] [4.6 regression] ARM bootstrap failure: internal compiler error: in expand_widen_pattern_expr, at optabs.c:522

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #6 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 08:11 
---
*** Bug 45097 has been marked as a duplicate of this bug. ***


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||jingyu at google dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45067



[Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2

2010-07-28 Thread ebotcazou at gcc dot gnu dot org


--- Comment #8 from ebotcazou at gcc dot gnu dot org  2010-07-28 08:16 
---
Fixing.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-07-09 13:23:31 |2010-07-28 08:16:48
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885



[Bug c/45100] internal compiler error: Segmentation fault (at -O3)

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-07-28 08:23 ---
Can't reproduce with current 4.5 branch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45100



[Bug tree-optimization/45101] New: [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread zsojka at seznam dot cz
Command line:
$ gcc O[123s] -fgcse -fgcse-las testcase.c

Compiler output:
$ gcc -O -fgcse -fgcse-las testcase.c
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: in insert_expr_in_table, at
gcse.c:1213
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revisions:
r162598 - crash
r162456 - OK


-- 
   Summary: [4.6 Regression] ICE: in insert_expr_in_table, at
gcse.c:1213 with -gcse-las
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug tree-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread zsojka at seznam dot cz


--- Comment #1 from zsojka at seznam dot cz  2010-07-28 08:28 ---
Created an attachment (id=21330)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21330&action=view)
reduced testcase

Most of the files I tested crash with -fgcse-las.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2010-07-28 Thread siarhei dot siamashka at gmail dot com


--- Comment #6 from siarhei dot siamashka at gmail dot com  2010-07-28 
08:37 ---
'arm_size_return_regs()' returns 2 when generating epilogue for 'next' function
here. And as a result, return value not registered in the mask, causing it to
be clobbered.

Would the following patch be the right fix?

Index: gcc/config/arm/arm.c
===
--- gcc/config/arm/arm.c(revision 162411)
+++ gcc/config/arm/arm.c(working copy)
@@ -13705,7 +13705,7 @@
  && !crtl->tail_call_emit)
{
  unsigned long mask;
- mask = (1 << (arm_size_return_regs() / 4)) - 1;
+ mask = (1 << ((arm_size_return_regs() + 3) / 4)) - 1;
  mask ^= 0xf;
  mask &= ~saved_regs_mask;
  reg = 0;


-- 

siarhei dot siamashka at gmail dot com changed:

   What|Removed |Added

  Component|c++ |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070



[Bug fortran/45077] ICE with -fwhole-file in fold_convert_loc, at fold-const.c:2021

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #3 from burnus at gcc dot gnu dot org  2010-07-28 08:44 ---
Subject: Bug 45077

Author: burnus
Date: Wed Jul 28 08:44:29 2010
New Revision: 162619

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162619
Log:
2010-07-28  Tobias Burnus  

PR fortran/45077
* trans-types.c (gfc_get_derived_type): Fix DT declaration
from modules for whole-file mode.

2010-07-28  Tobias Burnus  

PR fortran/45077
* gfortran.dg/whole_file_24.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/whole_file_24.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-types.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45077



[Bug fortran/45077] ICE with -fwhole-file in fold_convert_loc, at fold-const.c:2021

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #4 from burnus at gcc dot gnu dot org  2010-07-28 08:47 ---
Fixed for the unmodified example in comment 1 - and also for PR 40011 comment
47.

However, the following remains to be done: It still fails if one moves "module
iso_red" into a separate file (cf. PR 44945). The reason is that then "gsym"
will come up as NULL and every
module user uses a different decl.


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|burnus at gcc dot gnu dot   |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45077



[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2010-07-28 Thread ramana at gcc dot gnu dot org


--- Comment #7 from ramana at gcc dot gnu dot org  2010-07-28 09:01 ---
Thanks for the analysis, yes that appears to be the nub of the problem with the
result being removed . I see the same problem on trunk - 

Patches should however be submitted to gcc-patc...@gcc.gnu.org after
appropriate regression testing.

cheers
Ramana


-- 

ramana at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  Known to fail|4.5.0   |4.4.4 4.5.0
   Last reconfirmed|-00-00 00:00:00 |2010-07-28 09:01:18
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070



[Bug c/45102] New: mm/page-writeback.c:820: internal compiler error: Segmentation fault

2010-07-28 Thread yenchengwang at gmail dot com
the gcc version, system type, and options given when GCC configured/built:
ycw...@ycwang-laptop:/home/my_codes/Android/linux-2.6$ arm-eabi-gcc -v
Using built-in specs.
Target: arm-eabi
Configured with:
/home/jingyu/projects/gcc/android-toolchain/gcc-4.4.0/configure
--prefix=/usr/local --target=arm-eabi --host=i686-unknown-linux-gnu
--build=i686-unknown-linux-gnu --enable-languages=c,c++
--with-gmp=/home/jingyu/projects/gcc/toolchain_build/obj/temp-install
--with-mpfr=/home/jingyu/projects/gcc/toolchain_build/obj/temp-install
--disable-libssp --enable-threads --disable-nls --disable-libmudflap
--disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions
--disable-shared --disable-tls --with-float=soft --with-fpu=vfp
--with-arch=armv5te --enable-target-optspace --with-abi=aapcs
--with-gcc-version=4.4.0 --with-binutils-version=2.19 --with-gmp-version=4.2.4
--with-mpfr-version=2.4.1 --with-gdb-version=6.6 --with-arch=armv5te
--with-multilib-list=mthumb-interwork,mandroid
--with-sysroot=/g/users/jingyu/toolchain/cupcake_rel_root
--program-transform-name='s&^&arm-eabi-&'
Thread model: single
gcc version 4.4.0 (GCC)

//
complete command line that triggers the bug:
make zImage

//
compiler output:
...(ignored)
CC  mm/page-writeback.o
mm/page-writeback.c: In function 'write_cache_pages':
mm/page-writeback.c:820: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[1]: *** [mm/page-writeback.o] Error 1
make: *** [mm] Error 2

//


-- 
   Summary: mm/page-writeback.c:820: internal compiler error:
Segmentation fault
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yenchengwang at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45102



[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2010-07-28 Thread ramana at gcc dot gnu dot org


--- Comment #8 from ramana at gcc dot gnu dot org  2010-07-28 09:22 ---
(In reply to comment #7)
> Thanks for the analysis, yes that appears to be the nub of the problem with 
> the
> result being removed . I see the same problem on trunk - 
> 


I just realized that this is a packed structure and probably need to look up
the semantics of this in the AAPCS. IIRC the AAPCS states that it doesn't
support packed structures or bitfields at exported interfaces. 

Adding Richard for some ABI commentary.

cheers
Ramana


-- 

ramana at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rearnsha at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070



[Bug c/45102] mm/page-writeback.c:820: internal compiler error: Segmentation fault

2010-07-28 Thread ubizjak at gmail dot com


--- Comment #1 from ubizjak at gmail dot com  2010-07-28 09:25 ---
Please attach preprocessed source, see [1] for detailed instructions.

[1] http://gcc.gnu.org/bugs/


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45102



[Bug fortran/45087] -fwhole-program: Miscompiled due to wrong decls

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2010-07-28 09:32 ---
Patch. It fixes also test_fpu.f90  - however, for gas_dyn.f90 it causes a
segfault:

==24597== Invalid read of size 8
==24597==at 0x5A8DF3: ggc_set_mark (ggc-page.c:600)
==24597==by 0x73CD54: gt_ggc_mx_eh_status (gtype-desc.c:714)
==24597==by 0x73DA25: gt_ggc_mx_function (gtype-desc.c:943)
==24597==by 0x553410: gt_ggc_mx_lang_tree_node (gt-fortran-f95-lang.h:293)
==24597==by 0x73D94D: gt_ggc_m_P9tree_node4htab (gtype-desc.c:2544)
==24597==by 0x553EAD: gt_ggc_m_P17module_htab_entry4htab
(gtype-fortran.h:98)

Index: gcc/fortran/trans-decl.c
===
--- gcc/fortran/trans-decl.c(revision 162619)
+++ gcc/fortran/trans-decl.c(working copy)
@@ -1409,7 +1409,7 @@ gfc_get_extern_function_decl (gfc_symbol
   gsym =  gfc_find_gsymbol (gfc_gsym_root, sym->name);

   if (gfc_option.flag_whole_file
-   && !sym->attr.use_assoc
+   && (!sym->attr.use_assoc || sym->attr.if_source != IFSRC_DECL)
&& !sym->backend_decl
&& gsym && gsym->ns
&& ((gsym->type == GSYM_SUBROUTINE) || (gsym->type == GSYM_FUNCTION))


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45087



[Bug tree-optimization/45034] [4.3/4.4/4.5/4.6 Regression] "safe" conversion from unsigned to signed char gives broken code

2010-07-28 Thread rguenth at gcc dot gnu dot org


--- Comment #11 from rguenth at gcc dot gnu dot org  2010-07-28 09:32 
---
I suppose that

uy = -ux;

is really

uy = (unsigned char) -(int) ux;

as unsigned char promotes to int.  We then incorrectly
narrow this to -(signed char) ux.

We do this again in convert_to_integer.  Our bag of premature (and bogus)
optimizations.

case NEGATE_EXPR:
case BIT_NOT_EXPR:
  /* This is not correct for ABS_EXPR,
 since we must test the sign before truncation.  */
  {
tree typex;

/* Don't do unsigned arithmetic where signed was wanted,
   or vice versa.  */
if (TYPE_UNSIGNED (TREE_TYPE (expr)))
  typex = unsigned_type_for (type);
else
  typex = signed_type_for (type);
return convert (type,
fold_build1 (ex_form, typex,
 convert (typex,
  TREE_OPERAND (expr, 0;

well - I have no idea why we can't always choose an unsigned type here
(testing that now).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45034



[Bug c/45100] internal compiler error: Segmentation fault (at -O3)

2010-07-28 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2010-07-28 09:34 ---
Can reproduce with 4.5.0, fixed for 4.5.1.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to fail||4.5.0
 Resolution||FIXED
   Target Milestone|--- |4.5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45100



[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2010-07-28 Thread rearnsha at gcc dot gnu dot org


--- Comment #9 from rearnsha at gcc dot gnu dot org  2010-07-28 09:34 
---
(In reply to comment #8)

> I just realized that this is a packed structure and probably need to look up
> the semantics of this in the AAPCS. IIRC the AAPCS states that it doesn't
> support packed structures or bitfields at exported interfaces. 

That just means the ABI doesn't specify the behaviour here.  Portable code
shouldn't use this feature, but that doesn't mean that a compiler can't support
it as an extension.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070



[Bug tree-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||mkuvyrkov at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2010-07-28 Thread mikpe at it dot uu dot se


--- Comment #10 from mikpe at it dot uu dot se  2010-07-28 09:45 ---
(In reply to comment #8)
> I just realized that this is a packed structure and probably need to look up
> the semantics of this in the AAPCS. IIRC the AAPCS states that it doesn't
> support packed structures or bitfields at exported interfaces. 

In the C test case the function returning a packed struct is `static' and
called only by name from within the same translation unit.  Surely that's not
an "exported interface".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070



[Bug debug/45103] New: DW_OP_reg* has too large valid range for noreturn funcs

2010-07-28 Thread jan dot kratochvil at redhat dot com
Use -g -O2.

DW_OP_reg5 is there valid for each PC, despite there si a `call' and reg5 is
caller-saved register.  Its value therefore gets corrupted in the callee.

FAIL all these:
gcc (GCC) 4.6.0 20100724 (experimental)
gcc (GCC) 4.5.1 20100728 (prerelease)
gcc (GCC) 4.4.5 20100724 (prerelease)
gcc-4.4.4-10.fc13.x86_64
GNU gdb (GDB) 7.2.50.20100724-cvs

#0  breakat (q=0) at 1.c:7
#1  0x0040053b in f (a1=, a2=2, a3=3, a4=4, a5=5,
a6=6, a7=7) at 2.c:6
#2  0x004004fc in g (x=0) at 1.c:14
 ^^^ x=10 here, it should be 
#3  0x0040051e in main () at 2.c:14

==> 1.c <==
#include 

extern __attribute__((noreturn)) void f (long a1, long a2, long a3, long a4,
long a5, long a6, long a7);

__attribute__((noreturn)) void
breakat (long q)
{
  exit (0);
}

__attribute__((noinline)) void
g (long x)
{
  f (x, 2, 3, 4, 5, 6, 7);
}

==> 2.c <==
extern __attribute__((noreturn)) void breakat (long q);

__attribute__((noreturn)) void
f (long a1, long a2, long a3, long a4, long a5, long a6, long a7)
{
  breakat (0);
}

extern __attribute__((noinline)) void g (long x);

int
main (void)
{
  g (10);
  return 0;
}


-- 
   Summary: DW_OP_reg* has too large valid range for noreturn funcs
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jan dot kratochvil at redhat dot com
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45103



[Bug debug/45103] DW_OP_reg* has too large valid range for noreturn funcs

2010-07-28 Thread jan dot kratochvil at redhat dot com


--- Comment #1 from jan dot kratochvil at redhat dot com  2010-07-28 09:54 
---
Created an attachment (id=21331)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21331&action=view)
.s files for x86_64-unknown-linux-gnu.

GDB bug (probably invalid):
http://sourceware.org/bugzilla/show_bug.cgi?id=11838


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45103



[Bug tree-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #2 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 10:03 
---
This is due to a silly mistake of mine.  I got operand ordering of
insert_expr_in_table() wrong for -fgcse-las case.  Will check in an obvious
patch in several minutes.


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |mkuvyrkov at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-28 10:03:06
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2

2010-07-28 Thread ebotcazou at gcc dot gnu dot org


--- Comment #9 from ebotcazou at gcc dot gnu dot org  2010-07-28 10:03 
---
Subject: Bug 44885

Author: ebotcazou
Date: Wed Jul 28 10:03:00 2010
New Revision: 162621

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162621
Log:
PR tree-optimization/44885
* tree-sra.c (find_param_candidates): Skip pointer types to arrays
with non-aliased component.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-sra.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885



[Bug debug/45103] DW_OP_reg* has too large valid range for noreturn funcs

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-07-28 10:03 ---
Created an attachment (id=21332)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21332&action=view)
gcc46-pr45103.patch

For noreturn calls that end the function we were ignoring even
NOTE_DURING_CALL_P notes, thinking they don't affect any instructions.
While they don't affect any instructions in the current function, they affect
instructions in the called function.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45103



[Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2

2010-07-28 Thread ebotcazou at gcc dot gnu dot org


--- Comment #10 from ebotcazou at gcc dot gnu dot org  2010-07-28 10:04 
---
Schedule of variations:
unix/-m32

Running target unix/-m32
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/eric/svn/gcc/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /home/eric/svn/gcc/gcc/testsuite/gnat.dg/dg.exp ...
Running /home/eric/svn/gcc/gcc/testsuite/gnat.dg/specs/specs.exp ...
Running /home/eric/svn/gcc/gcc/testsuite/gnat.dg/style/style.exp ...

=== gnat Summary ===

# of expected passes815
# of expected failures  10
# of unsupported tests  4


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885



[Bug rtl-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #3 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 10:10 
---
Subject: Bug 45101

Author: mkuvyrkov
Date: Wed Jul 28 10:09:53 2010
New Revision: 162622

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162622
Log:
PR rtl-optimization/45101
* gcse.c (hash_scan_set): Fix argument ordering of insert_expr_in_table
for gcse-las.

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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug rtl-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #4 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 10:14 
---
Should be fixed by the above patch.


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug rtl-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #5 from jakub at gcc dot gnu dot org  2010-07-28 10:17 ---
Could you please commit the testcase too?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug bootstrap/45104] New: [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread dominiq at lps dot ens dot fr
At revision 162617, bootstrap fails with:


Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1objplus-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/cp/decl.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [all] Error 2

Last successful bootstrap at revision 162556.


-- 
   Summary: [4.6 Regression] Bootstrap failure: gcc/cp/decl.o
differs
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: x86_64-apple-darwin10.4.0
  GCC host triplet: x86_64-apple-darwin10.4.0
GCC target triplet: x86_64-apple-darwin10.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug rtl-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #6 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 10:32 
---
Done.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug rtl-optimization/45101] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -gcse-las

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #7 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 10:32 
---
Subject: Bug 45101

Author: mkuvyrkov
Date: Wed Jul 28 10:32:10 2010
New Revision: 162623

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162623
Log:
PR rtl-optimization/45101
* gcc.dg/pr45101.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr45101.c
Modified:
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45101



[Bug target/44903] [4.6 Regression] FAIL: gcc.dg/pr35258.c execution test

2010-07-28 Thread rguenth at gcc dot gnu dot org


--- Comment #21 from rguenth at gcc dot gnu dot org  2010-07-28 10:33 
---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44903



[Bug target/44903] [4.6 Regression] FAIL: gcc.dg/pr35258.c execution test

2010-07-28 Thread rguenth at gcc dot gnu dot org


--- Comment #22 from rguenth at gcc dot gnu dot org  2010-07-28 10:33 
---
Subject: Bug 44903

Author: rguenth
Date: Wed Jul 28 10:32:54 2010
New Revision: 162624

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162624
Log:
2010-07-28  Richard Guenther  

PR middle-end/44903
* builtins.c (fold_builtin_memory_op): On STRICT_ALIGNMENT
targets try harder to not generate unaligned accesses.

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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44903



[Bug debug/45105] New: [4.6 Regression] -fcompare-debug failure at -Os

2010-07-28 Thread zsojka at seznam dot cz
Compiler output:
$ gcc -Os -fcompare-debug testcase.c
gcc: error: testcase.c: -fcompare-debug failure

Tested revisions:
r162618 - fail
r162456 - OK


-- 
   Summary: [4.6 Regression] -fcompare-debug failure at -Os
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45105



[Bug debug/45105] [4.6 Regression] -fcompare-debug failure at -Os

2010-07-28 Thread zsojka at seznam dot cz


--- Comment #1 from zsojka at seznam dot cz  2010-07-28 10:41 ---
Created an attachment (id=21333)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21333&action=view)
reduced testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45105



[Bug c++/43912] lambda debug info does not describe captured variables

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-07-28 11:41 ---
Created an attachment (id=21334)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21334&action=view)
gcc46-pr43912.patch

Untested proof of concept patch (which handles just non-templates though).
The captured vars can be printed fine in the debugger, though no testing of
more complicated captures (like arrays etc.) has been done.

Not sure how to handle the template case though, so not working on this
anymore.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43912



[Bug debug/45105] [4.6 Regression] -fcompare-debug failure at -Os

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-07-28 11:43 ---
Reproduced and works with -fno-var-tracking-assignments.  Looking into it.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-28 11:43:45
   date||
   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45105



[Bug c/45106] New: casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems

2010-07-28 Thread robert dot haschke at uni-bielefeld dot de
Casting a variadic function pointer to normal function pointer (with adequate
number and type of arguments) causes a segfault, when the function is called.
Vice versa (casting normal function pointer to variadic function) works fine.
The problem only occurs for 64bit builds. Casting works nice in all directions
for 32bit builds.


-- 
   Summary: casting of variadic function pointers to normal function
pointers causes segfaults on 64bit systems
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: robert dot haschke at uni-bielefeld dot de
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106



[Bug c/45106] casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems

2010-07-28 Thread robert dot haschke at uni-bielefeld dot de


--- Comment #1 from robert dot haschke at uni-bielefeld dot de  2010-07-28 
11:52 ---
Created an attachment (id=21335)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21335&action=view)
preprocessed file


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106



[Bug c/45106] casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems

2010-07-28 Thread robert dot haschke at uni-bielefeld dot de


--- Comment #2 from robert dot haschke at uni-bielefeld dot de  2010-07-28 
11:53 ---
Created an attachment (id=21336)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21336&action=view)
original .c file


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106



[Bug c/45106] casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2010-07-28 11:57 ---
Don't do it, it is not valid.
The x86-64 ABI requires that for varargs the %al register contains number of
SSE regs that need saving, while for non-varargs functions that register is
undefined.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106



[Bug c/45106] casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems

2010-07-28 Thread rhaschke at techfak dot uni-bielefeld dot de


--- Comment #4 from rhaschke at techfak dot uni-bielefeld dot de  
2010-07-28 12:04 ---
Subject: Re:  casting of variadic function pointers to normal
 function pointers causes segfaults on 64bit systems

I was afraid of this answer.
However in my application, I have no clue which type of function pointer
is transferred. Thus, I should always cast to the variadic function
pointer in order to define the %al register?

Cheers, Robert


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106



[Bug tree-optimization/45034] [4.3/4.4/4.5/4.6 Regression] "safe" conversion from unsigned to signed char gives broken code

2010-07-28 Thread rguenth at gcc dot gnu dot org


--- Comment #12 from rguenth at gcc dot gnu dot org  2010-07-28 12:23 
---
Works.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-07-23 08:51:49 |2010-07-28 12:23:46
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45034



[Bug c/45106] casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems

2010-07-28 Thread schwab at linux-m68k dot org


--- Comment #5 from schwab at linux-m68k dot org  2010-07-28 12:26 ---
Calling a function with a different signature than declared is undefined in any
case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106



[Bug fortran/45087] -fwhole-program: Miscompiled due to wrong decls

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #3 from burnus at gcc dot gnu dot org  2010-07-28 12:35 ---
Minimal test case, compile with:
  gfortran --param ggc-min-expand=0 --param ggc-min-heapsize=0

module INTS
  interface
subroutine NEXT
end subroutine NEXT
subroutine VALUE()
end subroutine VALUE
  end interface
end module INTS

subroutine NEXT
end subroutine NEXT

subroutine VALUE()
  use INTS, only: NEXT
  CALL NEXT
end subroutine VALUE


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45087



[Bug fortran/37744] ICE-on-invalid with ISO_C_BINDING

2010-07-28 Thread mikael at gcc dot gnu dot org


--- Comment #13 from mikael at gcc dot gnu dot org  2010-07-28 12:45 ---
(In reply to comment #12)
> It seems a namespace is freed to soon. 
Reminder to self: symbol.c's build_formal_args creates a namespace for
c_f_pointer and c_f_proc_pointer. May be related.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37744



[Bug fortran/45087] -fwhole-program: Miscompiled due to wrong decls

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #4 from burnus at gcc dot gnu dot org  2010-07-28 13:14 ---
(In reply to comment #3)
> Minimal test case, compile with:
>   gfortran --param ggc-min-expand=0 --param ggc-min-heapsize=0

The problems seems to be that one tries to free the NEXT twice - once for the
symbol in VALUE and once as global procedure; this can be seen by the value
0xa5a5a5a5a5a5a5a5 in the dump - and by looking at the place where it crashes,
namely: gt_ggc_mx_function; the cleanup is done for the module, i.e.
gt_ggc_m_P17module_htab_entry4htab.
[Actually, it could also be that one frees "VALUE" twice - I have not verified
that it is NEXT.]

I thought something like the following would help - but it does _not_:

--- trans-decl.c(revision 162619)
+++ trans-decl.c(working copy)
@@ -3409,6 +3409,9 @@ gfc_create_module_variable (gfc_symbol *
   if (sym->attr.entry)
 return;

+  if (sym->attr.if_source != IFSRC_DECL)
+return;
+
   /* Make sure we convert the types of the derived types from iso_c_binding
  into (void *).  */
   if (sym->attr.flavor != FL_PROCEDURE && sym->attr.is_iso_c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45087



[Bug bootstrap/45104] [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread dominiq at lps dot ens dot fr


--- Comment #1 from dominiq at lps dot ens dot fr  2010-07-28 13:15 ---
Narrower window: revision 162585 bootstraps, 162601 fails.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug debug/45105] [4.6 Regression] -fcompare-debug failure at -Os

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2010-07-28 13:36 ---
Created an attachment (id=21337)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21337&action=view)
gcc46-pr45105-1.patch

Untested fix.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45105



[Bug fortran/45087] -fwhole-program: Miscompiled due to wrong decls

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #5 from burnus at gcc dot gnu dot org  2010-07-28 13:51 ---
(In reply to comment #3)
> Minimal test case, compile with:

There is something odd: If one has the order

  subroutine VALUE()
  subroutine NEXT

it actually works; one then goes

   gfc_create_function_decl for VALUE
   gfc_get_extern_function_decl for NEXT
 call gfc_create_function_decl for NEXT

while for the opposite order it fails:

   gfc_create_function_decl for NEXT
   gfc_create_function_decl for VALUE
   gfc_get_extern_function_decl for NEXT

In both cases the backend_decl is used in gfc_get_extern_function_decl. And in
all cases it seems as if the the module's next's gsym->...->backend_decl ==
NULL.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45087



[Bug target/45000] RX signed extened unsigned char or short return value.

2010-07-28 Thread nickc at redhat dot com


--- Comment #3 from nickc at redhat dot com  2010-07-28 13:55 ---
Created an attachment (id=21338)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21338&action=view)
Force functions that return small unsigned values to use zero-extension


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45000



[Bug c/45106] casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems

2010-07-28 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2010-07-28 14:01 ---
(In reply to comment #4)
> Subject: Re:  casting of variadic function pointers to normal
>  function pointers causes segfaults on 64bit systems
> 
> I was afraid of this answer.
> However in my application, I have no clue which type of function pointer
> is transferred. Thus, I should always cast to the variadic function
> pointer in order to define the %al register?
> 
> Cheers, Robert

That doesn't work either.  You have to pass around some cookie that
tells you the function prototype and cast to the appropriate one.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106



[Bug bootstrap/45104] [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug target/45000] RX signed extened unsigned char or short return value.

2010-07-28 Thread nickc at redhat dot com


--- Comment #4 from nickc at redhat dot com  2010-07-28 14:05 ---
Hi Kazuhiro-san,

> If the func() is external function, output code is the following.
>  bsr_func
>  mouv.B r1, r1
> If the return value is zero exteneded,
> "movu.B r1, r1" code can be removed.

Not really.  The problem is that the compiler cannot guarantee the behaviour of
the func function, since it is external to the compilation unit.  It might not
actually return an unsigned byte value.


> Is the explanation san integer conversion rank?

I am not sure what you mean here.  The simplest thing that I can say is that
the code produced by gcc is what is required by the ISO C99 standard.  If the
RX ABI requires a different behaviour then it is not compatible with the ISO
C99 standard.

That said I have uploaded a patch which offers a compromise.  It makes
functions which return small unsigned values insert a zero-extend instruction
into their epilogues.  This is less efficient than the change that you were
requesting (using MOVU.B to load the value from memory in the first place), but
it does mean that the code produced by gcc will work both with other code
produced by gcc and with code produced by Renesas's own compiler.

May I also suggest that you contact Matt Newsome  at
Renesas who is also concerned with this particular problem.

Cheers
  Nick


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45000



[Bug debug/45105] [4.6 Regression] -fcompare-debug failure at -Os

2010-07-28 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-07-28 11:43:45 |2010-07-28 14:12:18
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45105



[Bug tree-optimization/45034] [4.3/4.4/4.5/4.6 Regression] "safe" conversion from unsigned to signed char gives broken code

2010-07-28 Thread mikpe at it dot uu dot se


--- Comment #13 from mikpe at it dot uu dot se  2010-07-28 14:13 ---
I've bootstrapped and regtested Richard's proposed fix
(http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02161.html) on top of a recent
4.5 snapshot, and it fixed the test case (and the original code it was based
on) with no testsuite regressions.

Thanks.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45034



[Bug rtl-optimization/45107] New: [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -Os -gcse-las (another one)

2010-07-28 Thread zsojka at seznam dot cz
This is in r162622, after fixing PR45101.

Compiler output:
$ gcc -Os -fgcse-las testcase.c
testcase.c: In function 'foo':
testcase.c:9:1: internal compiler error: in insert_expr_in_table, at
gcse.c:1213
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revisions:
r162622 - crash
r162456 - OK


-- 
   Summary: [4.6 Regression] ICE: in insert_expr_in_table, at
gcse.c:1213 with -Os -gcse-las (another one)
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45107



[Bug rtl-optimization/45107] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -Os -gcse-las (another one)

2010-07-28 Thread zsojka at seznam dot cz


--- Comment #1 from zsojka at seznam dot cz  2010-07-28 14:18 ---
Created an attachment (id=21339)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21339&action=view)
reduced testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45107



[Bug rtl-optimization/45107] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -Os -gcse-las (another one)

2010-07-28 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45107



[Bug rtl-optimization/45107] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -Os -gcse-las (another one)

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #2 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 14:25 
---
Mine.


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |mkuvyrkov at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-28 14:25:37
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45107



[Bug debug/41048] bad DW_AT_data_member_location from g++

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #4 from jakub at gcc dot gnu dot org  2010-07-28 14:32 ---
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41048



[Bug tree-optimization/37541] VRP fails to optimize single-bit ranges

2010-07-28 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-07-28 14:43 ---
This seems fixed, just the optimizations in question are already performed
partly by FRE but one,

test2 (struct foo2 * x)
{
...
:
  D.2745_3 = BIT_FIELD_REF <*x_2(D), 8, 0>;
  D.2746_4 = D.2745_3 & 1;
  if (D.2746_4 == 0)
goto ;
  else
goto ;

:
  D.2750_6 = x_2(D)->i;


where for some reason our strange aggregate-bit-field-ref folding triggers
only for one load.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-28 14:43:02
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37541



[Bug fortran/45108] New: Namelist read: Not aborted when reading from STDIN

2010-07-28 Thread burnus at gcc dot gnu dot org
gfortran simply continues (with a warning) if one has a wrong namelist in
STDIN.

If one has an IOSTAT variable, it prints the warning but continues with an
IOSTAT == 0.

Using any other means of input (internal unit, external unit) works as
expected, i.e. run-time error - or a non-zero return value for iostat.

Example:

$ gfortran hjff.f90; cat foo.dat|./a.out
Cannot match namelist object name tag3
namelist read: misplaced = sign
 unreachable   0

$ cat foo.dat
&nml tag3=5 /

$ cat hjff.f90
namelist /nml/ tag
character(len=200) str
str ='&nml tg=5 /'
read(*,nml=nml,iostat=ios)
print *, 'unreachable', ios
end

Source code: See line 2964

http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgfortran/io/list_read.c;hb=HEAD#l2964


-- 
   Summary: Namelist read: Not aborted when reading from STDIN
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45108



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread danglin at gcc dot gnu dot org


--- Comment #5 from danglin at gcc dot gnu dot org  2010-07-28 15:00 ---
(In reply to comment #4)
> While the ICE nominally results from a hash lookup failure, replacing
> libiberty.a with the stage1 version makes no difference.  Thus, it
> doesn't appear that the problem is with the hash code.

This is wrong.  Hash related failure is different bug.  The backtrace
for this ICE is:

Program received signal SIGSEGV, Segmentation fault.
commutative_operand_precedence (op=0x0) at ../../gcc/gcc/rtlanal.c:2914
2914  enum rtx_code code = GET_CODE (op);
(gdb) bt
#0  commutative_operand_precedence (op=0x0) at ../../gcc/gcc/rtlanal.c:2914
#1  0x003b135c in swap_commutative_operands_p (x=, y=0x0)
at ../../gcc/gcc/rtlanal.c:2980
#2  0x003ee244 in simplify_const_relational_operation (code=NE, mode=SImode, 
op0=0x400122b8, op1=0x0) at ../../gcc/gcc/simplify-rtx.c:4256
#3  0x003e4ee0 in simplify_relational_operation (code=NE, mode=SImode, 
cmp_mode=SImode, op0=0x400122b8, op1=0x0)
at ../../gcc/gcc/simplify-rtx.c:3904
#4  0x003e565c in simplify_gen_relational (code=NE, mode=VOIDmode, 
cmp_mode=, op0=0x400122b8, op1=0x0)
at ../../gcc/gcc/simplify-rtx.c:346
#5  0x00317ec4 in iv_number_of_iterations (loop=0x7, desc=0x9b62d8)
at ../../gcc/gcc/loop-iv.c:2609
#6  check_simple_exit (loop=0x7, desc=0x9b62d8) at ../../gcc/gcc/loop-iv.c:2847
#7  find_simple_exit (loop=0x7, desc=0x9b62d8) at ../../gcc/gcc/loop-iv.c:2872

(gdb) p/x $pc
$2 = 0x3b11d8
(gdb) disass 0x3b11c8,0x3b11e8
Dump of assembler code from 0x3b11c8 to 0x3b11e8:
   0x003b11c8 :   ldo -4(r7),r7
   0x003b11cc :   b,l 0x3b10f8 ,r0
   0x003b11d0 :   ldi 0,ret0
   0x003b11d4 :   stw rp,-14(sp)
=> 0x003b11d8 :   ldh 0(r26),r19
   0x003b11dc :   ldo 40(sp),sp
   0x003b11e0 :  ldi 1e,r20
   0x003b11e4 :  cmpb,<>
r20,r19,0x3b11f8 
End of assembler dump.
(gdb) p/x $r26
$3 = 0x0

ICE also seen on hppa2.0w-hp-hpux11.11.


-- 

danglin at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu dot
   ||org
  GCC build triplet|hppa-unknown-linux-gnu  |hppa*-*-* (32-bit)
   GCC host triplet|hppa-unknown-linux-gnu  |hppa*-*-* (32-bit)
 GCC target triplet|hppa-unknown-linux-gnu  |hppa*-*-* (32-bit)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45063



[Bug fortran/45108] Namelist read: Not aborted when reading from STDIN

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #1 from burnus at gcc dot gnu dot org  2010-07-28 15:01 ---
That seemingly goes back to implementing support for:

+/* If the namelist read is from stdin, output the current state of the
+   namelist to stdout.  This is used to implement the non-standard query
+   features, ? and =?. If c == '=' the full namelist is printed. Otherwise
+   the names alone are printed.  */

Cf. commit:
http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=fc2a7c2711d61197795e86f34a978af6f71d8a34


Still, the status quo is not the correct solution - and highly irritating if
one works with long input and pipes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45108



[Bug fortran/45108] Namelist read: Not aborted when reading from STDIN

2010-07-28 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2010-07-28 15:07 ---
See also: http://gcc.gnu.org/onlinedocs/gfortran/Extensions-to-namelist.html

I understand the support of ? and =?, but why can't one give a proper error is
one returns? If one starts a dialog with ? / =?, one stays in the I/O, but if
one returns, a proper error should be used - at least if one has never started
a ? / =? conversation.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45108



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread danglin at gcc dot gnu dot org


--- Comment #6 from danglin at gcc dot gnu dot org  2010-07-28 15:15 ---
2609  assumption = simplify_gen_relational (NE, SImode, mode, tmp,
const0_rtx);

For some reason, 0 is being passed instead of const0_rtx.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45063



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread danglin at gcc dot gnu dot org


--- Comment #7 from danglin at gcc dot gnu dot org  2010-07-28 15:33 ---
   0x00317ea8 :  ldw -cc(sp),r19
   0x00317eac :  copy ret0,r23
   0x00317eb0 :  stw r19,-34(sp)
   0x00317eb4 :  copy r5,r24
   0x00317eb8 :  ldi 50,r26
   0x00317ebc :  b,l 0x30d394,rp
   0x00317ec0 :  ldi 7,r25

The op1 value is loaded from the stack frame at -0xcc.  The
frame value appears to be set here:

   0x00317e48 :  stw r19,-cc(sp)

Breakpoint 3, 0x00317e48 in iv_number_of_iterations (loop=0x40296580, 
desc=0x9b62d8) at ../../gcc/gcc/loop-iv.c:2605
2605  bound = GEN_INT (((unsigned HOST_WIDEST_INT) 1 << (size - 1 ) <<
1) - 1);
(gdb) p/x $r19
$10 = 0x0
(gdb) p size
$11 = 31


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45063



[Bug tree-optimization/45034] [4.3/4.4/4.5/4.6 Regression] "safe" conversion from unsigned to signed char gives broken code

2010-07-28 Thread mikpe at it dot uu dot se


--- Comment #14 from mikpe at it dot uu dot se  2010-07-28 15:38 ---
If I apply Richard's patch to gcc-4.4-20100727 and bootstrap/regtest the new
test case works but I get a single regression in the old ones:

FAIL: gcc.dg/vect/vect-22.c scan-tree-dump-times vect "vectorized 4 loops" 1

Looking in vect-22.c.101t.vect reveals:

...
.../gcc/testsuite/gcc.dg/vect/vect-22.c:87: note: not vectorized: relevant stmt
not supported: D.2174_43 = (short unsigned int) D.2173_42;
...
.../gcc-4.4-20100727/gcc/testsuite/gcc.dg/vect/vect-22.c:73: note: not
vectorized: relevant stmt not supported: D.2164_26 = (unsigned char) D.2163_25;
...
.../gcc-4.4-20100727/gcc/testsuite/gcc.dg/vect/vect-22.c:54: note: vectorized 2
loops in function.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45034



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread bernds at gcc dot gnu dot org


--- Comment #8 from bernds at gcc dot gnu dot org  2010-07-28 15:46 ---
It sounds like the compiler is being miscompiled?  If so, it's probably not
helpful trying to debug the miscompiled compiler binary.  The best way to debug
this would be to produce one working build and one failing build of the
compiler, then narrow down which file is being miscompiled by copying over
object files from one directory to another.  You may have a candidate already
in the code you're looking at.

Once that's identified, please attach a .i of the file that's being
miscompiled, and the exact command line options to give cc1 to reproduce the
miscompilation.  A set of good/bad .s files might also help.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45063



[Bug bootstrap/45104] [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread dominiq at lps dot ens dot fr


--- Comment #2 from dominiq at lps dot ens dot fr  2010-07-28 15:51 ---
Bootstrap fails also at revision 162600. I also tried revisions 162592 and
162593, but they fails earlier with:

gcc -c   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../../work/gcc -I../../work/gcc/. -I../../work/gcc/../include
-I../../work/gcc/../libcpp/include -I/opt/sw64/include 
-I../../work/gcc/../libdecnumber -I../../work/gcc/../libdecnumber/dpd
-I../libdecnumber  -I/opt/sw64/include -DCLOOG_PPL_BACKEND  
-I/opt/sw64/include ../../work/gcc/gcse.c -o gcse.o
../../work/gcc/gcse.c: In function 'hoist_code':
../../work/gcc/gcse.c:4448: warning: unused variable 'occr'
../../work/gcc/gcse.c:4542: error: 'occr' undeclared (first use in this
function)
../../work/gcc/gcse.c:4542: error: (Each undeclared identifier is reported only
once
../../work/gcc/gcse.c:4542: error: for each function it appears in.)
make[3]: *** [gcse.o] Error 1


-- 

dominiq at lps dot ens dot fr changed:

   What|Removed |Added

 CC||mkuvyrkov at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug bootstrap/45104] [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #3 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 16:01 
---
Can you please try the latest trunk with the patch in
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02185.html applied?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug bootstrap/45104] [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2010-07-28 16:04 ---
> Can you please try the latest trunk with the patch in
> http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02185.html applied?

This is what I am trying right now. Allow for 45 minutes to have an answer.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug rtl-optimization/45107] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -Os -gcse-las (another one)

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #3 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 16:14 
---
Patch posted in http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02192.html .


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45107



[Bug bootstrap/45104] [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread dominiq at lps dot ens dot fr


--- Comment #5 from dominiq at lps dot ens dot fr  2010-07-28 16:47 ---
> > Can you please try the latest trunk with the patch in
> > http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02185.html applied?
>
> This is what I am trying right now. Allow for 45 minutes to have an answer.

At revision 162637 with the patch in
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02185.html  I have passed the
comparison step without failure. So this PR looks like a duplicate of pr45105.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug rtl-optimization/45107] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -Os -gcse-las (another one)

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #4 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 16:50 
---
Subject: Bug 45107

Author: mkuvyrkov
Date: Wed Jul 28 16:50:14 2010
New Revision: 162645

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162645
Log:
PR rtl-optimization/45107
* gcse.c (hash_scan_set): Use max_distance for gcse-las.

PR rtl-optimization/45107
* gcc.dg/pr45107.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr45107.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcse.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45107



[Bug bootstrap/45104] [4.6 Regression] Bootstrap failure: gcc/cp/decl.o differs

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #6 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 16:51 
---
Thanks for checking.

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


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45104



[Bug debug/45105] [4.6 Regression] -fcompare-debug failure at -Os

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #4 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 16:51 
---
*** Bug 45104 has been marked as a duplicate of this bug. ***


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dominiq at lps dot ens dot
   ||fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45105



[Bug rtl-optimization/45107] [4.6 Regression] ICE: in insert_expr_in_table, at gcse.c:1213 with -Os -gcse-las (another one)

2010-07-28 Thread mkuvyrkov at gcc dot gnu dot org


--- Comment #5 from mkuvyrkov at gcc dot gnu dot org  2010-07-28 16:52 
---
Should be fixed by the above patch.


-- 

mkuvyrkov at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45107



[Bug debug/45103] DW_OP_reg* has too large valid range for noreturn funcs

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2010-07-28 17:00 ---
Subject: Bug 45103

Author: jakub
Date: Wed Jul 28 17:00:06 2010
New Revision: 162646

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162646
Log:
PR debug/45103
* dwarf2out.c (dwarf2out_var_location): Always consider
NOTE_DURING_CALL_P notes, even when not followed by real instructions.

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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45103



[Bug debug/45105] [4.6 Regression] -fcompare-debug failure at -Os

2010-07-28 Thread jakub at gcc dot gnu dot org


--- Comment #5 from jakub at gcc dot gnu dot org  2010-07-28 17:01 ---
Subject: Bug 45105

Author: jakub
Date: Wed Jul 28 17:01:05 2010
New Revision: 162647

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162647
Log:
PR debug/45105
* gcse.c (hoist_code): Use FOR_BB_INSNS macro.

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

Added:
trunk/gcc/testsuite/gcc.dg/pr45105.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcse.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45105



[Bug tree-optimization/45109] New: ICE: in get_constraint_for_component_ref, at tree-ssa-structalias.c:2932

2010-07-28 Thread jipeng at broadcom dot com
This is similar to PR44946 that was fixed in gcc-4.6pre

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44946

Command line:

mipsel-linux-gcc test.c -c -o test.o -O2

Output:

test.c: In function ‘o_plist_deserialize_xml’:
test.c:34: internal compiler error: tree check: expected class ‘expression’,
have ‘declaration’ (function_decl) in get_constraint_for_component_ref, at
tree-ssa-structalias.c:2932
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revision:

4.4.* - fail
4.5.0 - OK


-- 
   Summary: ICE: in get_constraint_for_component_ref, at tree-ssa-
structalias.c:2932
   Product: gcc
   Version: 4.4.5
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jipeng at broadcom dot com
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: mipsel-linux-uclibc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45109



[Bug tree-optimization/45109] ICE: in get_constraint_for_component_ref, at tree-ssa-structalias.c:2932

2010-07-28 Thread jipeng at broadcom dot com


--- Comment #1 from jipeng at broadcom dot com  2010-07-28 17:09 ---
Created an attachment (id=21340)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21340&action=view)
testing case


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45109



[Bug debug/45110] New: GCC does not emit DW_AT_object_pointer

2010-07-28 Thread tromey at gcc dot gnu dot org
DWARF 3 introduced DW_AT_object_pointer, for marking the "this" parameter
of a method.  GCC does not emit this, so currently GDB has to use a 
heuristic to detect this.


-- 
   Summary: GCC does not emit DW_AT_object_pointer
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45110



[Bug middle-end/42509] [4.4 Regression] nonoverlapping_memrefs_p misinterprets NULL MEM_OFFSET as const0_rtx

2010-07-28 Thread uweigand at gcc dot gnu dot org


--- Comment #29 from uweigand at gcc dot gnu dot org  2010-07-28 18:00 
---
Subject: Bug 42509

Author: uweigand
Date: Wed Jul 28 18:00:08 2010
New Revision: 162650

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162650
Log:
Backport from mainline:
2010-04-03  Richard Guenther  

PR middle-end/42509
* alias.c (nonoverlapping_memrefs_p): For spill-slot accesses
require a non-NULL MEM_OFFSET.

Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/alias.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42509



[Bug middle-end/42509] [4.4 Regression] nonoverlapping_memrefs_p misinterprets NULL MEM_OFFSET as const0_rtx

2010-07-28 Thread uweigand at gcc dot gnu dot org


--- Comment #30 from uweigand at gcc dot gnu dot org  2010-07-28 18:01 
---
Backported fix to 4.4 branch as well.  The bug should now be fixed everywhere.


-- 

uweigand at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42509



[Bug target/45111] New: main function isn't profiled

2010-07-28 Thread ktietz at gcc dot gnu dot org
I recently noticed that for the main function the _monstartup call gets emitted
after _mcount call. This leads to the issue, that for the main function itself
no information are getting gathered.

A possible solution here would be to call mcount for main-function, if not
-mfentry is used, a second time. This shouldn't harm.

Any comments?


-- 
   Summary: main function isn't profiled
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ktietz at gcc dot gnu dot org
GCC target triplet: i?86-*-cygwin *-*-mingw*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45111



[Bug tree-optimization/45021] Redundant prefetches for some loops (vectorizer produced ones too)

2010-07-28 Thread changpeng dot fang at amd dot com


--- Comment #4 from changpeng dot fang at amd dot com  2010-07-28 18:22 
---
Andrew's example is exactly what the prefetch sees for the test case (in the
bug description). Unfortunately, the prefetch pass could not recognize that
vect_pa.6_24 and vect_pa.20_38 are exactly the same address:

:
  pretmp.2_18 = (float) beta_4(D);
  vect_pa.9_22 = (vector(4) float *) &a;
  vect_pa.6_23 = vect_pa.9_22;
  vect_cst_.12_27 = {pretmp.2_18, pretmp.2_18, pretmp.2_18, pretmp.2_18};
  vect_pb.16_29 = (vector(4) float *) &b;
  vect_pb.13_30 = vect_pb.16_29;
  vect_pa.23_36 = (vector(4) float *) &a;
  vect_pa.20_37 = vect_pa.23_36;

:
  # vect_pa.6_24 = PHI 
  # vect_pb.13_31 = PHI 
  # vect_pa.20_38 = PHI 
  # ivtmp.24_40 = PHI 
  vect_var_.10_26 = *vect_pa.6_24;
  vect_var_.11_28 = vect_cst_.12_27;
  vect_var_.17_33 = *vect_pb.13_31;
  vect_var_.18_34 = vect_var_.11_28 * vect_var_.17_33;
  vect_var_.19_35 = vect_var_.10_26 + vect_var_.18_34;
  *vect_pa.20_38 = vect_var_.19_35;
  vect_pa.6_25 = vect_pa.6_24 + 16;
  vect_pb.13_32 = vect_pb.13_31 + 16;
  vect_pa.20_39 = vect_pa.20_38 + 16;
  ivtmp.24_41 = ivtmp.24_40 + 1;
  if (ivtmp.24_41 < 256)
goto ;
  else
goto ;

:
  goto ;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45021



[Bug c++/45112] New: [4.5/4.6 regression] Aligned attribute on static class member definition ignored

2010-07-28 Thread uweigand at gcc dot gnu dot org
Building the following testcase fails with G++ 4.5 and later.
G++ 4.4 works fine.


struct JSString
{
  unsigned char mLength;
  static JSString unitStringTable[];
};

JSString JSString::unitStringTable[] __attribute__ ((aligned (8))) = { 1 };

int bug [__alignof__ (JSString::unitStringTable) >= 8 ? 1 : -1];


The test case is reduced from Mozilla, where the bug sometimes causes the
JavaScript interpreter to crash.  See also:
https://bugzilla.mozilla.org/show_bug.cgi?id=582593

The problem appears to be that cp-decl.c:duplicate_decls fails to merge
the DECL_USER_ALIGN flag from the definition into the declaration.

This bug was introduced by the following patch:
http://gcc.gnu.org/ml/gcc-patches/2009-06/msg00763.html

Before that patch, the DECL_USER_ALIGN flag was part of a block copied in whole
via memcpy by duplicate_decls.  The patch moved that flag to another location
outside that block, so it is no longer copied ...


-- 
   Summary: [4.5/4.6 regression] Aligned attribute on static class
member definition ignored
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uweigand at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45112



  1   2   >