[Bug target/49909] FSF gcc 4.6.1 fails to bootstrap on Core Solo/Core Duo

2011-07-30 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49909

--- Comment #5 from Andreas Schwab  2011-07-30 07:51:29 
UTC ---
If you want to build x86-64 multilib natively you must use a capable host. 
Otherwise force cross compilation.


[Bug target/23621] gcj-dbtool aborts on m68k-linux

2011-07-30 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23621

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||4.4.0
 Resolution||FIXED

--- Comment #2 from Andreas Schwab  2011-07-30 08:45:41 
UTC ---
Assuming fixed.


[Bug bootstrap/49907] [4.5/4.6/4.7 Regression] lto-plugin -Wall in stage1

2011-07-30 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49907

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Keywords||build
   Last reconfirmed||2011.07.30 09:33:06
 Ever Confirmed|0   |1
Summary|lto-plugin -Wall in stage1  |[4.5/4.6/4.7 Regression]
   ||lto-plugin -Wall in stage1
   Target Milestone|--- |4.5.4

--- Comment #1 from Richard Guenther  2011-07-30 
09:33:06 UTC ---
Confirmed.


[Bug target/49909] FSF gcc 4.6.1 fails to bootstrap on Core Solo/Core Duo

2011-07-30 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49909

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #6 from Richard Guenther  2011-07-30 
09:38:14 UTC ---
indeed


[Bug fortran/48876] ICE when initializing character variable with zero-length string

2011-07-30 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48876

Thomas Koenig  changed:

   What|Removed |Added

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

--- Comment #3 from Thomas Koenig  2011-07-30 
09:56:30 UTC ---
Taking a look.


[Bug libstdc++/49870] regex_match vs. "^"

2011-07-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49870

--- Comment #1 from Jonathan Wakely  2011-07-30 
11:38:01 UTC ---
See PR 47724


Re: code won't compile on new version of gcc

2011-07-30 Thread Jonathan Wakely
Re http://gcc.gnu.org/ml/gcc-bugs/2011-07/msg02349.html

This mailing list is for automatically generated emails from Bugzilla,
mails sent to it directly may get missed or ignored.  You should send
questions about using GCC to the gcc-help list. Bugs should be
reported to Bugzilla, not by email.  Your question would have been
most appropriate on the gcc-help list.

Your code is almost certainly wrong, failing to include some required
headers.  With gcc 4.1 those headers were indirectly included by some
standard library header, but that has been fixed in later versions.
You need to fix your code by including the right headers, maybe just



[Bug c++/49896] undefined reference to static const integral member whose address is not used, for some values of the constant

2011-07-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49896

--- Comment #5 from Jonathan Wakely  2011-07-30 
12:09:28 UTC ---
The initializer results in integer overflow which is undefined behaviour, so if
G++ accepts it but requires the variable to be defined then that is a
reasonable result.

The modified example shouldn't cause an ICE, that's a regression, but it seems
to be fixed in 4.7 already


[Bug tree-optimization/49094] ARM aligned(1) attribute is sometimes dropped

2011-07-30 Thread sgh at sgh dot dk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49094

--- Comment #10 from Søren Holm  2011-07-30 12:10:57 UTC ---
Created attachment 24869
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24869
Another testcase that fails. Even with current 4.6

With "static" on line 33 the code generated is wrong. Removing "static" the
code generated is correct.


[Bug tree-optimization/49094] ARM aligned(1) attribute is sometimes dropped

2011-07-30 Thread sgh at sgh dot dk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49094

Søren Holm  changed:

   What|Removed |Added

 CC||sgh at sgh dot dk

--- Comment #11 from Søren Holm  2011-07-30 12:13:56 UTC ---
tst2.c also fails with an alignment related problem. I'm unsue if this should
be reported in another bug.

With "static" on line 33 the code generated is this :


unsigned int aostk_font_strwidth(const struct aostk_font* font, const char*
str) {
const struct aostk_glyph* g = aostk_get_glyph(font, 0);
return g->advance.x;
   0:   e5903003ldr r3, [r0, #3]
}
   4:   e5d30005ldrbr0, [r3, #5]
   8:   e12fff1ebx  lr


The first ldr-instruction is wrong afaik sinct struct aostk_font is packed.

Removing "static" fomr line 33 gives this code :


const struct aostk_glyph* aostk_get_glyph(const struct aostk_font* f, unsigned
int c) {
return &f->glyphs[0];
   0:   e5d02004ldrbr2, [r0, #4]
   4:   e5d03003ldrbr3, [r0, #3]
   8:   e1833402orr r3, r3, r2, lsl #8
   c:   e5d02005ldrbr2, [r0, #5]
  10:   e5d6ldrbr0, [r0, #6]
  14:   e1833802orr r3, r3, r2, lsl #16
}
  18:   e1830c00orr r0, r3, r0, lsl #24
  1c:   e12fff1ebx  lr

0020 :
const struct aostk_glyph* glyphs;
};


const struct aostk_glyph* aostk_get_glyph(const struct aostk_font* f, unsigned
int c) {
return &f->glyphs[0];
  20:   e5d02004ldrbr2, [r0, #4]
  24:   e5d03003ldrbr3, [r0, #3]
  28:   e1833402orr r3, r3, r2, lsl #8
  2c:   e5d02005ldrbr2, [r0, #5]
  30:   e1833802orr r3, r3, r2, lsl #16
  34:   e5d02006ldrbr2, [r0, #6]
  38:   e1833c02orr r3, r3, r2, lsl #24


unsigned int aostk_font_strwidth(const struct aostk_font* font, const char*
str) {
const struct aostk_glyph* g = aostk_get_glyph(font, 0);
return g->advance.x;
}
  3c:   e5d30005ldrbr0, [r3, #5]
  40:   e12fff1ebx  lr
>>

Notice in aostk_get_glyph that the ldrb-instructions are used instead of ldr.


[Bug tree-optimization/49094] ARM aligned(1) attribute is sometimes dropped

2011-07-30 Thread sgh at sgh dot dk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49094

--- Comment #12 from Søren Holm  2011-07-30 12:30:25 UTC ---
Oh... I just realized that the failing case does not fail because of the first
ldr-instruction. It fails becasue of something else. Maybe you guys have a
better eye for ARM-assembler to be able to verify that the code.


[Bug middle-end/43513] The stack pointer is adjusted twice

2011-07-30 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43513

--- Comment #6 from vries at gcc dot gnu.org 2011-07-30 12:37:50 UTC ---
Author: vries
Date: Sat Jul 30 12:37:47 2011
New Revision: 176959

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176959
Log:
2011-07-30  Tom de Vries  

PR middle-end/43513
* tree-ssa-dce.c (ref_may_be_aliased): Add assert.
(propagate_necessity): Handle WITH_SIZE_EXPR call arg.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-dce.c


[Bug tree-optimization/49094] ARM aligned(1) attribute is sometimes dropped

2011-07-30 Thread sgh at sgh dot dk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49094

--- Comment #13 from Søren Holm  2011-07-30 12:37:41 UTC ---
gcc 4.4.6 generates the following code with the "static" keyword

unsigned int aostk_font_strwidth(const struct aostk_font* font, const char*
str) {
   0:   e5d02004ldrbr2, [r0, #4]
   4:   e5d03003ldrbr3, [r0, #3]
   8:   e5d01005ldrbr1, [r0, #5]
   c:   e1833402orr r3, r3, r2, lsl #8
  10:   e5d02006ldrbr2, [r0, #6]
  14:   e1833801orr r3, r3, r1, lsl #16
  18:   e1833c02orr r3, r3, r2, lsl #24
const struct aostk_glyph* g = aostk_get_glyph(font, 0);
return g->advance.x;
}
  1c:   e5d30005ldrbr0, [r3, #5]
  20:   e12fff1ebx  lr


[Bug target/49909] FSF gcc 4.6.1 fails to bootstrap on Core Solo/Core Duo

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

--- Comment #7 from Jack Howarth  2011-07-30 
14:06:08 UTC ---
How would I perform a cross-compilation in this situation? I considered that
option but isn't cross-compilation designed for the situation when neither the
code generated by the base compiler or the multi lib can execute on the host?
Also, it seemed that the cross compilation depended on host not being the same
as target or build (which isn't the situation here). The i386-apple-darwin10
triplet is perfectly correct for all three. So how do you do a
cross-compilation for EMT64 code (i.e. -m64) in the multi lib for a non-EMT64
processor (both of which have the same i386-apple-darwin triplet).


[Bug target/49909] FSF gcc 4.6.1 fails to bootstrap on Core Solo/Core Duo

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

--- Comment #8 from Jack Howarth  2011-07-30 
14:22:07 UTC ---
Also,  while I don't have a Core Solo or Core Duo machine to test this on, I
would expect this issue to exist on other i386-*-* targets. The default build
will create a multilibs for x86_64 but  the build will fail in the x86_64
multilib for libquadmath (which is unique in the FSF gcc multilibs as its
configure tries to execute generated code). Surely this late failure in the
bootstrap is considered a bug.


[Bug tree-optimization/49911] New: vrp2 + -fstrict-enums incorrectly remove predicate

2011-07-30 Thread rafael.espindola at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49911

   Summary: vrp2 + -fstrict-enums incorrectly remove predicate
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rafael.espind...@gmail.com


with a r176947 cc1plus, running

cc1plus -fstrict-enums -fdump-tree-all ~/tmpfs/test2.ii -fno-rtti
-fno-exceptions -fno-strict-aliasing   -m32 -O2

in

extern  void JS_Assert();
typedef enum {
eax, ecx, edx, ebx, esp, ebp,
esi, edi }
RegisterID;
union StateRemat {
  RegisterID reg_;
  int offset_;
};
static StateRemat FromRegister(RegisterID reg) {
  StateRemat sr;
  sr.reg_ = reg;
  return sr;
}
static StateRemat FromAddress3(int address) {
  StateRemat sr;
sr.offset_ = address;
  //sr.offset_ = 0;
  if (address < 46 &&address >= 0) {
JS_Assert();
  }
  return sr;
}
struct FrameState {
  StateRemat dataRematInfo2(bool y, int z) {
if (y) return FromRegister(RegisterID(1));
return FromAddress3(z);
  }
};
FrameState frame;
StateRemat x;
void jsop_setelem(bool y, int z) {
  x = frame.dataRematInfo2(y, z);
}

produces a test2.ii.123t.vrp2 with:

Folding predicate SR.6_11 <= 45 to 1

replacing the "sr.offset_ = address" line with sr.offset_ = 0 prevents the
transformation.


[Bug c++/49896] undefined reference to static const integral member whose address is not used, for some values of the constant

2011-07-30 Thread harald at gigawatt dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49896

--- Comment #6 from Harald van Dijk  2011-07-30 
14:59:09 UTC ---
> The initializer results in integer overflow which is undefined behaviour

No, it doesn't result in integer overflow. 0x8000 is a constant of type
unsigned int, which is implicitly converted to the desired type of int.
Converting an out-of-range integer value to a signed integer type is
implementation-defined which has been defined in GCC in a sensible way,
documented at
.


[Bug fortran/49638] [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-07-30 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49638

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.07.30 16:16:12
 CC||janus at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from janus at gcc dot gnu.org 2011-07-30 16:16:12 UTC ---
Confirmed.

ifort says:

pr49638.f90(9): error #8280: An overriding binding and its corresponding
overridden binding must both be either subroutines or functions with the same
result type, kind, and shape.   [STRING]

pgf95 says:

PGF90-S-0155-Result is not compatible with parent's result for type bound
procedure w2_string (pr49638.f90: 20)


[Bug fortran/49638] [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-07-30 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49638

--- Comment #2 from janus at gcc dot gnu.org 2011-07-30 16:23:25 UTC ---
Note: In resolve.c there is 'check_typebound_override' which should take care
of these kind of things. It already rejects overriding procedures with
different result types, and it has a FIXME note for more comprehensive
checking.


[Bug c++/49912] New: ICE from -freorder-blocks-and-partition : verify_flow_info failed

2011-07-30 Thread b3timmons at speedymail dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49912

   Summary: ICE from -freorder-blocks-and-partition :
verify_flow_info failed
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: b3timm...@speedymail.org
  Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
 Build: i686-pc-linux-gnu


Created attachment 24870
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24870
preprocessed source compressed with bzip2

Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c,c++
--enable-__cxa_atexit --enable-cloog-backend=ppl --with-cloog=/usr/local
Thread model: posix
gcc version 4.7.0 20110729 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-B' '.' '-r' '-nostdlib' '-Wall' '-O'
'-freorder-blocks-and-partition' '-mtune=generic' '-march=pentiumpro'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/cc1plus -fpreprocessed elf.ii
-quiet -dumpbase elf.ii -mtune=generic -march=pentiumpro -auxbase elf -O -Wall
-version -freorder-blocks-and-partition -o /tmp/ccZ24I88.s
GNU C++ (GCC) version 4.7.0 20110729 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.7.0 20110729 (experimental), GMP version
5.0.1, MPFR version 3.0.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.7.0 20110729 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.7.0 20110729 (experimental), GMP version
5.0.1, MPFR version 3.0.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: ba0648b8eea6bd4be4f484a576bf2c59
elf.cpp: In member function void ElfDynamic_Section::setValueForType(unsigned
int, ElfValue*):
elf.cpp:666:28: warning: deleting object of polymorphic class type ElfValue
which has non-virtual destructor might cause undefined behaviour
[-Wdelete-non-virtual-dtor]
elf.cpp: In destructor virtual ElfDynamic_Section::~ElfDynamic_Section():
elf.cpp:780:24: warning: deleting object of polymorphic class type ElfValue
which has non-virtual destructor might cause undefined behaviour
[-Wdelete-non-virtual-dtor]
In file included from elf.cpp:41:0:
elfxx.h: In member function virtual void Elf_Ehdr::serialize(std::ofstream&,
char, char):
elfxx.h:432:5: error: wrong number of branch edges after unconditional jump 17
elfxx.h:432:5: error: wrong number of branch edges after unconditional jump 16
elfxx.h:432:5: internal compiler error: verify_flow_info failed


[Bug c++/49913] New: ICE from -O2 -fgraphite-identity : extract_range_from_binary_expr, at tree-vrp.c:2318

2011-07-30 Thread b3timmons at speedymail dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49913

   Summary: ICE from -O2 -fgraphite-identity :
extract_range_from_binary_expr, at tree-vrp.c:2318
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: b3timm...@speedymail.org
  Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
 Build: i686-pc-linux-gnu


Created attachment 24871
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24871
preprocessed source compressed with bzip2

Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c,c++
--enable-__cxa_atexit --enable-cloog-backend=ppl --with-cloog=/usr/local
Thread model: posix
gcc version 4.7.0 20110729 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-B' '.' '-r' '-nostdlib' '-c' '-Wno-invalid-offsetof'
'-Wall' '-O2' '-fgraphite-identity' '-o'
'/home/b3po/.ccache/0/e/956098775a73252aeb52acf90004db-981039.o.tmp.goof.5408'
'-mtune=generic' '-march=pentiumpro'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/cc1plus -fpreprocessed
jsclone.ii -quiet -dumpbase jsclone.ii -mtune=generic -march=pentiumpro
-auxbase-strip
/home/b3po/.ccache/0/e/956098775a73252aeb52acf90004db-981039.o.tmp.goof.5408
-O2 -Wno-invalid-offsetof -Wall -version -fgraphite-identity -o /tmp/ccqnkwUY.s
GNU C++ (GCC) version 4.7.0 20110729 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.7.0 20110729 (experimental), GMP version
5.0.1, MPFR version 3.0.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.7.0 20110729 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.7.0 20110729 (experimental), GMP version
5.0.1, MPFR version 3.0.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: ba0648b8eea6bd4be4f484a576bf2c59
jsclone.cpp: In function bool js::WriteStructuredClone(JSContext*, const
js::Value&, uint64**, size_t*, const JSStructuredCloneCallbacks*, void*):
jsclone.cpp:52:1: internal compiler error: in extract_range_from_binary_expr,
at tree-vrp.c:2318


[Bug c++/49912] ICE from -freorder-blocks-and-partition : verify_flow_info failed

2011-07-30 Thread b3timmons at speedymail dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49912

--- Comment #1 from Bake Timmons  2011-07-30 
16:49:14 UTC ---
Sorry, forgot command line that led to the ICE:  gcc -v -B. -r -nostdlib -Wall
-O -freorder-blocks-and-partition elf.ii


[Bug c++/49913] ICE from -O2 -fgraphite-identity : extract_range_from_binary_expr, at tree-vrp.c:2318

2011-07-30 Thread b3timmons at speedymail dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49913

--- Comment #1 from Bake Timmons  2011-07-30 
16:50:55 UTC ---
Sorry, forgot command line that led to the ICE:  gcc -v -B. -r -nostdlib -c
-Wno-invalid-offsetof -Wall -O2 -fgraphite-identity jsclone.ii


[Bug tree-optimization/49094] ARM aligned(1) attribute is sometimes dropped

2011-07-30 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49094

--- Comment #14 from Martin Jambor  2011-07-30 
17:15:12 UTC ---
(In reply to comment #11)
> tst2.c also fails with an alignment related problem. I'm unsue if this should
> be reported in another bug.
> 

It it fails with a current checkout of the trunk or the 4.6 branch it
is most probably a different issue and should be reported in a
separate bug.

So please file a new bug, post its number here, and, if the testcase
does not fail with -fno-tree-sra, CC me.  Thanks.


[Bug other/49914] New: call to abs(long long) in gcc/fold-const.c

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

   Summary: call to abs(long long) in gcc/fold-const.c
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: marc.gli...@normalesup.org


Hello,

in gcc/fold-const.c (currently line 7051), in function
fold_plusminus_mult_expr:

if (exact_log2 (abs (int11)) > 0 && int01 % int11 == 0

where int11 is a HOST_WIDE_INT. Is this call to abs safe? A few lines above,
abs is computed as x>=0?x:-x.

(don't know how to classify this, but it causes a build failure for me with a
C++98 compiler (ambiguous))


[Bug fortran/48876] ICE when initializing character variable with zero-length string

2011-07-30 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48876

--- Comment #4 from Thomas Koenig  2011-07-30 
18:17:57 UTC ---
Author: tkoenig
Date: Sat Jul 30 18:17:55 2011
New Revision: 176961

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176961
Log:
2011-07-30  Thomas Koenig  

PR fortran/48876
* expr.c (gfc_simplify_expr):  If end of a string is less
than zero, set it to zero.

2011-07-30  Thomas Koenig  

PR fortran/48876
* gfortran.dg/string_5.f90:  New test.


Added:
trunk/gcc/testsuite/gfortran.dg/string_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/expr.c
trunk/gcc/testsuite/ChangeLog


[Bug other/49914] call to abs(long long) in gcc/fold-const.c

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

--- Comment #1 from Marc Glisse  2011-07-30 
18:29:06 UTC ---
Also occurs at gcc/tree-ssa-loop-prefetch.c:797 and in many places in
gcc/tree-ssa-math-opts.c.


[Bug c/49915] New: Function call with 2-D arrays and -O2 (or strict-aliasing and inlining) gives random results

2011-07-30 Thread jquinsey at entrenet dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49915

   Summary: Function call with 2-D arrays and -O2 (or
strict-aliasing and inlining) gives random results
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: jquin...@entrenet.com


Created attachment 24872
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24872
test.i from gcc -v -save-temps -O2 test.c

A function call with two-dimensional arrays and -O2 (or the switches
-fstrict-aliasing and -finline) gives random results.

Complete source code (14 lines):

static void copy(int n, int a[][n], int b[][n]) {
   int i, j;
   for (i = 0; i < 2; i++)// 'n' not used in this example
  for (j = 0; j < 2; j++) // 'n' hard-coded to 2 for simplicity
 b[i][j] = a[i][j];
}

int main(int argc, char *argv[]) {
   int a[2][2] = {{1, 2},{3, 4}};
   int b[2][2];
   copy(2, a, b);
   printf("%d %d %d %d\n", b[0][0], b[0][1], b[1][0], b[1][1]);
   return 0;
}

Test results:

gcc -O1 test.c && a.out
1 2 3 4
gcc -O2 test.c && a.out
12173125 -1079787588 -1079787736 13389812
gcc -O1 -fstrict-aliasing -finline test.c && a.out
12173125 -1080040260 -1080040408 13389812

All three tests also produced the (obvious) warning:

test.c: In function 'main':
test.c:12: warning: incompatible implicit declaration of built-in function
'printf'

gcc -v -save-temps -O2 test.c 
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --disable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)
 /usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1 -E -quiet -v test.c
-mtune=generic -O2 -fpch-preprocess -o test.i
ignoring nonexistent directory
"/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i386-redhat-linux/4.1.2/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1 -fpreprocessed test.i -quiet
-dumpbase test.c -mtune=generic -auxbase test -O2 -version -o test.s
GNU C version 4.1.2 20080704 (Red Hat 4.1.2-50) (i386-redhat-linux)
compiled by GNU C version 4.1.2 20080704 (Red Hat 4.1.2-50).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d8d95095eb3c93dae4bed2137d559f95
test.c: In function 'main':
test.c:12: warning: incompatible implicit declaration of built-in function
'printf'
 as -V -Qy -o test.o test.s
GNU assembler version 2.17.50.0.6-14.el5 (i386-redhat-linux) using BFD version
2.17.50.0.6-14.el5 20061020
 /usr/libexec/gcc/i386-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_i386
--hash-style=gnu -dynamic-linker /lib/ld-linux.so.2
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o
-L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2
-L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. test.o -lgcc --as-needed
-lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o


[Bug c/49915] Function call with 2-D arrays and -O2 (or strict-aliasing and inlining) gives random results

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

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #1 from Mikael Pettersson  2011-07-30 
18:56:05 UTC ---
I can reproduce this error with gcc 4.0.4 and 4.1.2 on i686-linux, but 4.2.4 up
to 4.6.1 work, as do 3.4.6/3.3.6/3.2.3/2.95.3.

4.1.2 is no longer supported upstream, please update to 4.4.6 or newer, or
report this problem to your vendor (Red Hat?).


[Bug c/49915] Function call with 2-D arrays and -O2 (or strict-aliasing and inlining) gives random results

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

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME

--- Comment #2 from Paolo Carlini  2011-07-30 
19:24:15 UTC ---
Let's close this, then.


[Bug tree-optimization/49916] New: matrix-reorg optimization segmentation fault

2011-07-30 Thread nbjensen at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49916

   Summary: matrix-reorg optimization segmentation fault
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: nbjen...@gmail.com


Created attachment 24873
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24873
Source code to reproduce.

GCC 4.5.1, 4.5.2(.deb) and 4.6.0.
System: Ubuntu 11.04.

Compile options:
gcc -Wall -O3 -fwhole-program -fipa-matrix-reorg -fdump-ipa-matrix-reorg
-std=c99 double-2d-matrix.c

No errors or warnings when compiling. When running the program a segmentation
fault.

Valgrind was used to analyze memory the memory management and the memory write
A[1][0] was not allocated.

If the sizes of the matrix dimensions are changed the bug might disappear. It
seems a bit random.


[Bug c++/49917] New: g++.dg/init/for1.C wrong?

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

   Summary: g++.dg/init/for1.C wrong?
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: marc.gli...@normalesup.org


Hello,

I am having trouble understanding the test g++.dg/init/for1.C (copied below for
reference). For me, i and r are both 0 at first. a gets created. The loop
iterates twice, so i is 2 (not 1). a gets destroyed (so r is set to 1) and the
test returns 1. I noticed this because unrelated local patches cause a
testsuite failure.

#include 

int i;
int r;

class A
{
public:
  A() { printf("A ctor\n"); }
  ~A()
  {
printf("A dtor\n");
if (i != 1)
  r = 1;
  }
};

int main(int argc, char **argv)
{
  for (A a; i < 2; ++i) {
printf("iteration %d\n", i);
  }

  return r;
}


[Bug c++/49917] g++.dg/init/for1.C wrong?

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

--- Comment #1 from Paolo Carlini  2011-07-30 
20:06:34 UTC ---
Looks like the test should a dg-do run (not implicitly a dg-do compile!) and
then changed to assign if i != 2, right? Then I believe it would work as a
regression test for c++/13865.


[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

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

--- Comment #90 from Marc Glisse  2011-07-30 
20:19:42 UTC ---
How does one go about reporting a bug in solaris? In Solaris 11, with
-std=c++** (as opposed to gnu++**), __cplusplus=199711L and without -m64 or
-pthreads, iso/stdio_iso.h doesn't declare getc but uses it in the definition
of getchar.


[Bug testsuite/49917] g++.dg/init/for1.C wrong?

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

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.07.30 20:24:50
  Component|c++ |testsuite
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #2 from Paolo Carlini  2011-07-30 
20:24:50 UTC ---
Confirmed.


[Bug testsuite/49917] g++.dg/init/for1.C wrong?

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

--- Comment #3 from Marc Glisse  2011-07-30 
20:25:19 UTC ---
(In reply to comment #1)
> Looks like the test should a dg-do run (not implicitly a dg-do compile!)

Aha! It never crossed my mind...

> then changed to assign if i != 2, right?

I think so.


[Bug testsuite/49917] g++.dg/init/for1.C wrong?

2011-07-30 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49917

--- Comment #4 from paolo at gcc dot gnu.org  
2011-07-30 20:29:32 UTC ---
Author: paolo
Date: Sat Jul 30 20:29:29 2011
New Revision: 176962

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176962
Log:
2011-07-30  Paolo Carlini  

PR testsuite/49917
* g++.dg/init/for1.C: Fix.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/init/for1.C


[Bug testsuite/49917] g++.dg/init/for1.C wrong?

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

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #5 from Paolo Carlini  2011-07-30 
20:32:56 UTC ---
Done.


[Bug fortran/49918] New: Spurious -Wconvert warnings when using a BOZ data statement

2011-07-30 Thread david.schanen at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49918

   Summary: Spurious -Wconvert warnings when using a BOZ data
statement
   Product: gcc
   Version: 4.5.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: david.scha...@gmail.com


On GNU/Linux x86_64 systems gfortran issues warnings about converting from
INTEGER(16) that appear to be spurious when the -Wconversion flag is enabled. 

Example program:

program data_test
  implicit none

  integer(kind=4) :: bits4

  integer(kind=2) :: bits2

  integer(kind=16) :: bits16

  data bits4 /Z"7F80"/

  data bits2 /Z"7F80"/

  data bits16 /Z"7F80"/

end program data_test

The first 2 data statements cause a warning, but the last one does not.  It
appears the compiler assumes all data statements are 16 bytes long, regardless
of the actually length of the data statement.  I'm not sure of the status of
this on other platforms.


[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

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

--- Comment #91 from Marc Glisse  2011-07-30 
21:02:20 UTC ---
solaris also provides the pow(*,int) overloads (see DR550). Should these be
fixincluded out? On the other hand, solaris doesn't provide the cos(int)
overload, so cos(0) fails as ambiguous (like with sunpro) if one includes
math.h and not cmath. Should this be ignored? or the integral overload
fixincluded into math.h? or an extra math.h shipped that is equivalent to cmath
(careful to use #include_next)?

In any case, as already mentioned, we'll have trouble with different versions
of solaris providing different things in their headers. The solution of having
__cplusplus as 199711L except for system headers where it is 1 seems easier.


[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

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

--- Comment #92 from Marc Glisse  2011-07-30 
21:08:20 UTC ---
Created attachment 24874
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24874
for Solaris 11

Still some bugs. And I didn't include the patch to mangle std::tm/ldiv_t/... as
if they were in the global namespace so the ABI is broken. And the c++config
bit would need proper guarding. And the patch includes unrelated stuff I had to
patch along the way.


[Bug fortran/49918] Spurious -Wconvert warnings when using a BOZ data statement

2011-07-30 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49918

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||kargl at gcc dot gnu.org
 Resolution||INVALID

--- Comment #1 from kargl at gcc dot gnu.org 2011-07-30 21:13:19 UTC ---
Please read the Fortran standard concerning the
use of BOZ in a data statement.


[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

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

--- Comment #93 from Paolo Carlini  2011-07-30 
21:15:30 UTC ---
If we can converge, with Rainer' help too, to something working at least on
current Solaris (besides Linux), I'm pretty sure we'll be able to deliver it in
4.7.0!


[Bug fortran/48876] ICE when initializing character variable with zero-length string

2011-07-30 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48876

--- Comment #5 from Thomas Koenig  2011-07-30 
21:33:14 UTC ---
Author: tkoenig
Date: Sat Jul 30 21:33:11 2011
New Revision: 176963

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176963
Log:
2011-07-30  Thomas Koenig  

Backport from trunk.
PR fortran/48876
* expr.c (gfc_simplify_expr):  If end of a string is less
than zero, set it to zero.

2011-07-30  Thomas Koenig  

Backport from trunk.
PR fortran/48876
* gfortran.dg/string_5.f90:  New test.


Added:
branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/string_5.f90
Modified:
branches/gcc-4_6-branch/gcc/fortran/ChangeLog
branches/gcc-4_6-branch/gcc/fortran/expr.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug bootstrap/49681] 4.6.1 cross-build fails in libquadmath/libiberty

2011-07-30 Thread pashev.igor at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49681

Igor Pashev  changed:

   What|Removed |Added

 CC||pashev.igor at gmail dot
   ||com

--- Comment #1 from Igor Pashev  2011-07-30 
22:02:32 UTC ---
Confirm.


[Bug fortran/48876] ICE when initializing character variable with zero-length string

2011-07-30 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48876

Thomas Koenig  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #6 from Thomas Koenig  2011-07-30 
22:59:02 UTC ---
Fixed on trunk and 4.6.  Closing.


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

2011-07-30 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47659

Thomas Koenig  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.07.30 23:07:25
 CC||tkoenig at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Thomas Koenig  2011-07-30 
23:07:25 UTC ---
Confirmed.


[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

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

--- Comment #94 from Marc Glisse  2011-07-30 
23:16:55 UTC ---
(In reply to comment #92)
> Created attachment 24874 [details]
> for Solaris 11

If I manually fixinclude the getc problem and the pow declarations, the only
unexpected testsuite failures I get are ext/profile/mutex_extensions_neg.cc
(expected error moved by 5 lines) and the ABI breakage.

Fixing the ABI is not too hard (add substitutions to cp/mangle.c for std::tm
and a couple others) but I don't know if that's acceptable (it may yield weird
duplicate symbol errors) and if it should be done only on solaris.


[Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion

2011-07-30 Thread dmarkman at mac dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

   Summary: problem with building gcc 4.6.1 on Mac OS X Lion
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dmark...@mac.com


Created attachment 24875
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24875
config log

Hi I got a build error
configure: error: cannot compute suffix of object files: cannot compile

here is what I did

1. I downloaded gmp 5.0.2
   applied patch from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49738
   ./configure
--prefix=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
   make make install
   make check

2. downloaded mpfr 3.0.1
./configure --prefix=/Users/dima/Development/GCC/builds/mpfr-3.0.1/build/x86_64
--with-gmp=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
make 
make install
make check

3. downloaded mpc 0.8.2
./configure --prefix=/Users/dima/Development/GCC/builds/mpc-0.8.2/build/x86_64
--with-gmp=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
--with-mpfr=/Users/dima/Development/GCC/builds/mpfr-3.0.1/build/x86_64
make 
make install
make check

4. downloaded gcc-4.6.1
./configure --prefix=/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64
--enable-languages=c,c++,fortran
--with-gmp=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
--with-mpfr=/Users/dima/Development/GCC/builds/mpfr-3.0.1/build/x86_64
--with-mpc=/Users/dima/Development/GCC/builds/mpc-0.8.2/build/x86_64
make

and after few minutes I got:
checking for x86_64-apple-darwin11.0.0-gcc...
/Users/dima/Development/GCC/gcc-4.6.1/host-x86_64-apple-darwin11.0.0/gcc/xgcc
-B/Users/dima/Development/GCC/gcc-4.6.1/host-x86_64-apple-darwin11.0.0/gcc/
-B/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/bin/
-B/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/lib/
-isystem
/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/include
-isystem
/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/sys-include
 
checking for suffix of object files... configure: error: in
`/Users/dima/Development/GCC/gcc-4.6.1/x86_64-apple-darwin11.0.0/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

thanks

Note: 
here are some outputs from uname gcc -v
uname -a
Darwin dimamacbookpro.local 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18
12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64

gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~108/src/configure
--disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~108/dst-llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)