Processed: Not a kc++ bug

2001-07-27 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> unforwarded 104614
Unknown command or malformed arguments to command.

> reassign 104614 libstdc++3-dev
Bug#104614: Build failure with g++ 3.0
Bug reassigned from package `kimwitu++' to `libstdc++3-dev'.

> thanks
Stopping processing here.

Please contact me if you need assistance.

Darren Benham
(administrator, Debian Bugs database)




Re: Bug#106716: gcc-3.0.1 refuses to compile Linux kernel

2001-07-27 Thread Petr Vandrovec
On 26 Jul 01 at 18:26, Christopher C. Chimelis wrote:
> > ncpfs code is affected by this (fortunately it still links as I
> > gave up teaching gcc to inline code long ago). And as there is no
> > documentation since when this option is supported, it is just guessing
> > (or someone has to add -flimit-inline check to autoconf or kernel makefile).
> 
> Ok, to clarify what I think you're trying to say:
> gcc 2.95.x used -finline-limit-N
> gcc 3.0.x uses  -finline-limit=N
> (no, that's not a typo on my part...the hyphen was replaced by an equal
> sign according to the docs)
> 
> Since neither 2.95.x or 3.0.x understand the other's options, it's
> not inlining the code that needs to be?  I understand what the various gcc
> passes do WRT inlining, so no need to explain that portion...I'm just
> trying to understand why changing the kernel Makefile is such a big deal,
> especially since the kernel folks haven't began recommending that the

Fortunately 3.0.x understands -finline-limit-N , so it can be simple
check for -fno-strict-aliasing is. Unless 3.0.2 will stop supporting
this older format.

> kernel be compiled with gcc 3.0.x yet anyway.  There are MANY more
> pitfalls involved in compiling kernels with gcc 3.0.x on some
> platforms.  I've had to patch Alpha's kernel sources just to compile the
> kernel at all with gcc 3.0.
 
> For the record, according to 2.4.6's Documentation/Changes file:

I was always under impression that in future you want to get old gcc2.91.xx 
replaced with newer one. If newer one refuses to compile kernel...
> 
> > extern inline void copy_siginfo(siginfo_t* to, siginfo_t* from) {
> >   if (from->si_code < 0) 
> >  memcpy(to, from, sizeof(siginfo_t));
> >   else
> >  memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
> > }
> > 
> > then I think that there is something wrong...
> 
> Hmm...I'm definitely going to have to play with this.  Can you come up
> with a small testcase so that I can test other architectures as well?

After digging through - problem is not with copy_siginfo, but with
kernel's memcpy. 

I understand that internal code for __constant_memcpy can be very large
due to switch(), but as only one branch is then really used (and
correctly retrieved in copy_siginfo), compiler should not give up
with function too large. It does what documentation says it does (modulo
default limit), but - it could even optimize whole function to nothing,
but still complain about non-inlinable code.

And btw, for this particular example __constant_memcpy inlines with 
'-finline-limit=143' or larger. So I think that 100 is just unreasonable 
low inline limit, as real examples show that code generated from such 
function contains only 5 asm instructions... Maybe if optimizer could 
check longest code path in __constant_memcpy instead of size of whole
function, it could work.

Or even better - I believe that there is bug in how size of
copy_siginfo was computed. As compiler knew size parameter passed to
__constant_memcpy even before whole copy_siginfo was compiled,
it should threw unused portions of inlined __constant_memcpy out,
should not? (and I do not believe that after this throwing out
copy_siginfo size is 143...)
Thanks,
Petr Vandrovec
[EMAIL PROTECTED]

Generated code (+ 2 comments):

.file   "xx.c"
.section.rodata
.LC0:
.string "%u\n"
.text
.align 16
.globl main
.type   main,@function
main:
pushl   %edi
xorl%eax, %eax
subl$288, %esp
cld
movl%esp, %edi
movl$33, %ecx
rep
stosl
movl%esp, %eax ## Why not push %esp?
pushl   %eax   ## It does same thing...
leal148(%esp), %eax
pushl   %eax
callcopy_siginfo
movl152(%esp), %eax## pushl 152(%esp) ?
pushl   %eax   ## instead of using %eax
pushl   $.LC0
callprintf
addl$304, %esp
popl%edi
ret
.Lfe1:
.size   main,.Lfe1-main
.align 16
.type   copy_siginfo,@function
copy_siginfo:
pushl   %edi
pushl   %esi
movl16(%esp), %esi
movl12(%esp), %edi
movl(%esi), %edx
testl   %edx, %edx
js  .L64
movl$6, %ecx
.L65:
#APP
rep ; movsl
#NO_APP
popl%esi
popl%edi
ret
.p2align 4,,7
.L64:
movl$33, %ecx
jmp .L65
.Lfe2:
.size   copy_siginfo,.Lfe2-copy_siginfo
.ident  "GCC: (GNU) 3.0.1 20010721 (Debian prerelease)"


Source:

#include 

static inline void * __memcpy(void * to, const void * from, size_t n)
{
int d0, d1, d2;
__asm__ __volatile__(
"rep ; movsl\n\t"
"testb $2,%b4\n\t"
"je 1f\n\t"
"movsw\n"
"1:\ttestb $1,%b4\n\t"
"je 2f\n\t"
"movsb\n"
"2:"
: "=&c" (d0), "

Processed: libstc++ patch

2001-07-27 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> unforward 104614
Unknown command or malformed arguments to command.

> tags 104614 patch
Bug#104614: Build failure with g++ 3.0
Tags added: patch

> severity 104614 important
Bug#104614: Build failure with g++ 3.0
Severity set to `important'.

> thanks
Stopping processing here.

Please contact me if you need assistance.

Darren Benham
(administrator, Debian Bugs database)




Processed: Bug came back

2001-07-27 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> notforwarded 104614
Bug#104614: Build failure with g++ 3.0
Removed annotation that Bug had been forwarded to [EMAIL PROTECTED]

> thanks
Stopping processing here.

Please contact me if you need assistance.

Darren Benham
(administrator, Debian Bugs database)




Problem with generic member

2001-07-27 Thread fasbjx

>Submitter-Id:  net-debian
>Originator:Franck Branjonneau
>Organization:  
>Confidential:  no
>Synopsis:   Problem with generic member.
>Severity:   critical
>Priority:   medium
>Category:  c++
>Class:  rejects-legal
>Release:   3.0 (Debian) (Debian testing/unstable)
>Environment:
System: Linux alpha.tchume.net 2.4.4 #2 mar mai 22 08:16:07 CEST 2001 i586 
unknown
Architecture: i586


host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,proto,objc --prefix=/usr 
--infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as 
--with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-x 
--without-included-gettext --disable-checking --enable-threads=posix 
--enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:

The following code:

enum X { L };

template< X x  >
struct Sa { enum E {}; };

  
template< X x  >
struct Sb {
  template< Sa< x >::E e >
  class C;
}; 

template<>
struct Sb< L > {
  template< Sa< L >::E e >
  struct D: public Sb< anything >::C;
};

don't compile. From codesourcery:

These are the results of processing your source code with the following command:

g++ [input] 


Exit code: 256

Messages:

/usr/tmp/@30575.7.cc:16: Internal error #2000.
/usr/tmp/@30575.7.cc:16: Internal compiler error in make_typename_type, at 
   cp/decl.c:5659

>How-To-Repeat:

>Fix:





Bug#106866: gcc-3.0: Optimisation: [i386] pointless jump before a call

2001-07-27 Thread herbert
Package: gcc-3.0
Version: 1:3.0.1-0pre010723
Severity: normal

I was playing with the noreturn flag when I noticed the following pointless
jump into a call instruction:

  86:   a1 00 00 00 00  mov0x0,%eax
87: R_386_32intpending
  8b:   85 c0   test   %eax,%eax
  8d:   74 c9   je 58 
  8f:   eb 3b   jmpcc 
  91:   8d 76 00lea0x0(%esi),%esi

...

  c8:   eb d4   jmp9e 
  ca:   89 f6   mov%esi,%esi
  cc:   e8 fc ff ff ff  call   cd 
cd: R_386_PC32  doint
  d1:   8d 76 00lea0x0(%esi),%esi

There are no other jumps to cc.  That costed me 8 bytes and a pointless
jump.

The source that generated this can be fetched from

http://gondor.apana.org.au/~herbert/bugs/gcc-bug-1.tar.bz2

To reproduce, do:

gcc-3.0 -g -O2 -DUSE_DOINT -c eval.c

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux gondolin 2.4.7-686-smp #1 SMP Sun Jul 22 14:00:21 EST 
2001 i686 unknown

Versions of the packages gcc-3.0 depends on:
ii  binutils   2.11.90.0.24-1 The GNU assembler, linker and binary utiliti
ii  cpp-3.03.0.1-0pre0107 The GNU C preprocessor.
ii  gcc-3.0-base   3.0.1-0pre0107 The GNU Compiler Collection (base package).
ii  libc6  2.2.3-7GNU C Library: Shared libraries and Timezone
ii  libgcc13.0.1-0pre0107 GCC support library.