Bug#152709: gcc: __VA_ARGS__ stringification crashes preprocessor if __VA_ARGS__ is empty

2002-07-12 Thread Daniel Webb
Package: gcc
Version: 2:2.95.4-14
Severity: normal


-- System Information
Debian Release: 3.0
Kernel Version: Linux robust.colorado.edu 2.4.17 #1 SMP Sun Apr 21 21:05:15 MDT 
2002 i686 unknown

Versions of the packages gcc depends on:
ii  cpp2.95.4-14  The GNU C preprocessor.
ii  cpp-2.95   2.95.4-7   The GNU C preprocessor.
ii  gcc-2.95   2.95.4-7   The GNU C compiler.

Example code:
--
#define ASSERT(test_expression, ...) \
if (! (test_expression)) \
{ \
  fprintf(stderr, "Assertion failed: " #test_expression "\n"); \
  fprintf(stderr, #__VA_ARGS__);  \
  fprintf(stderr, "Function trace:\n"); \
  exit(1); \
}

int main(void)
{
ASSERT(1>0);
printf("run_tests(): Assertion failure.\n");
ASSERT(0>1, "Test completed successfully.");

return 0;
}
--

>gcc compiler_error.c
gcc: Internal compiler error: program cpp0 got fatal signal 11




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Bug#152601: gcc-3.0: Dead symlink at /usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so

2002-07-12 Thread Matthias Klose
[EMAIL PROTECTED] writes:
> Package: gcc-3.0
> Version: 1:3.0.4-7
> Severity: normal
> 
> AIDE reported this dead symlink:
> 
> lrwxrwxrwx1 root root   18 Jul  5 20:16 
> /usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so -> /lib/libgcc_s.so.1
> 

could you send the output for

dpkg -S /usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so

dpkg -L libgcc1


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Processed: Re: Bug#152315: g++-2.95-3/4 template and virtual inheritance bug

2002-07-12 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> retitle 152315 [fixed in g++-3.x] g++-2.95-3/4 template and virtual 
> inheritance bug
Bug#152315: g++-2.95-3/4 template and virtual inheritance bug
Changed Bug title.

> tags 152315 + fixed
Bug#152315: [fixed in g++-3.x] g++-2.95-3/4 template and virtual inheritance bug
Tags added: fixed

> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Bug#152601: gcc-3.0: Dead symlink at /usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so

2002-07-12 Thread Herbert Thielen
Moin,

[EMAIL PROTECTED]:~$ dpkg -S
/usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so
gcc-3.0: /usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so

[EMAIL PROTECTED]:~$ dpkg -L libgcc1
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libgcc1
/usr/share/doc/libgcc1/copyright
/usr/share/doc/libgcc1/changelog.Debian.gz
/lib

Regards
Herbert.


Matthias Klose wrote:
> 
> [EMAIL PROTECTED] writes:
> > Package: gcc-3.0
> > Version: 1:3.0.4-7
> > Severity: normal
> >
> > AIDE reported this dead symlink:
> >
> > lrwxrwxrwx1 root root   18 Jul  5 20:16 
> > /usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so -> /lib/libgcc_s.so.1
> >
> 
> could you send the output for
> 
> dpkg -S /usr/lib/gcc-lib/hppa-linux/3.0.4/libgcc_s.so
> 
> dpkg -L libgcc1


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Bug#152709: gcc: __VA_ARGS__ stringification crashes preprocessor if __VA_ARGS__ is empty

2002-07-12 Thread Matthias Klose
tags 152709 + fixed
retitle 152709 [fixed in gcc-3.x] __VA_ARGS__ stringification crashes 
preprocessor if __VA_ARGS__ is empty 
reassign 152709 gcc-2.95
thanks

Daniel Webb writes:
> Package: gcc
> Version: 2:2.95.4-14
> Severity: normal
> 
> 
> -- System Information
> Debian Release: 3.0
> Kernel Version: Linux robust.colorado.edu 2.4.17 #1 SMP Sun Apr 21 21:05:15 
> MDT 2002 i686 unknown
> 
> Versions of the packages gcc depends on:
> ii  cpp2.95.4-14  The GNU C preprocessor.
> ii  cpp-2.95   2.95.4-7   The GNU C preprocessor.
> ii  gcc-2.95   2.95.4-7   The GNU C compiler.
> 
> Example code:
> --
> #define ASSERT(test_expression, ...) \
> if (! (test_expression)) \
> { \
>   fprintf(stderr, "Assertion failed: " #test_expression "\n"); \
>   fprintf(stderr, #__VA_ARGS__);  \
>   fprintf(stderr, "Function trace:\n"); \
>   exit(1); \
> }
> 
> int main(void)
> {
> ASSERT(1>0);
> printf("run_tests(): Assertion failure.\n");
> ASSERT(0>1, "Test completed successfully.");
> 
> return 0;
> }
> --
> 
> >gcc compiler_error.c
> gcc: Internal compiler error: program cpp0 got fatal signal 11
> 
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Bug#151196: gcc-2.95.4-9 ICE in kernel (matroxfb) code

2002-07-12 Thread Petr Vandrovec
On 12 Jul 02 at 9:22, Matthias Klose wrote:

> retitle 151196 [fixed in gcc-3.x] gcc-2.95.4-9 ICE in kernel (matroxfb) code
> tags 151196 + fixed
> thanks

My system still runs 'gcc-2.95.4' when I type 'gcc', so how it
comes that you tag this fixed? I could understand 'wontfix', but
not 'fixed'.
Thanks,
Petr Vandrovec
[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Processed: Re: Bug#152709: gcc: __VA_ARGS__ stringification crashes preprocessor if __VA_ARGS__ is empty

2002-07-12 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> tags 152709 + fixed
Bug#152709: gcc: __VA_ARGS__ stringification crashes preprocessor if 
__VA_ARGS__ is empty
Tags added: fixed

> retitle 152709 [fixed in gcc-3.x] __VA_ARGS__ stringification crashes 
> preprocessor if __VA_ARGS__ is empty
Bug#152709: gcc: __VA_ARGS__ stringification crashes preprocessor if 
__VA_ARGS__ is empty
Changed Bug title.

> reassign 152709 gcc-2.95
Bug#152709: [fixed in gcc-3.x] __VA_ARGS__ stringification crashes preprocessor 
if __VA_ARGS__ is empty
Bug reassigned from package `gcc' to `gcc-2.95'.

> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Processed: Re: Bug#151196: gcc-2.95.4-9 ICE in kernel (matroxfb) code

2002-07-12 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> retitle 151196 [fixed in gcc-3.x] gcc-2.95.4-9 ICE in kernel (matroxfb) code
Bug#151196: gcc-2.95.4-9 ICE in kernel (matroxfb) code
Changed Bug title.

> tags 151196 + fixed
Bug#151196: [fixed in gcc-3.x] gcc-2.95.4-9 ICE in kernel (matroxfb) code
Tags added: fixed

> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Bug#151196: gcc-2.95.4-9 ICE in kernel (matroxfb) code

2002-07-12 Thread Matthias Klose
retitle 151196 [fixed in gcc-3.x] gcc-2.95.4-9 ICE in kernel (matroxfb) code
tags 151196 + fixed
thanks

Petr Vandrovec writes:
> Package: gcc-2.95
> Version: 2.95.4-9
> 
> Hi,
>   I removed debug prints from new matroxfb driver, and ... compiler 
> died. Simplest example I was able to invent is below. If you uncomment
> printf(), or if you'll remove (almost) any line from computeRegs() body, 
> it will stop ICE.
> 
>   gcc-3.0 (3.0.4-10) and gcc-3.1 (3.1.1-0pre2) compile code flawlessly.
> 
>   Best regards,
>   Petr Vandrovec
>   [EMAIL PROTECTED]
> 
> 
> $ gcc-2.95 -W -Wall -O2 bug.c
> bug.c: In function `computeRegs':
> bug.c:72: Internal compiler error:
> bug.c:72: internal error--unrecognizable insn:
> (insn 62 61 151 (parallel[
> (set (reg:SI 0 %eax)
> (asm_operands ("") ("=a") 0[
> (reg:DI 1 %edx)
> ]
> [
> (asm_input:DI ("A"))
> ]  ("bug.c") 60))
> (set (reg:SI 1 %edx)
> (asm_operands ("") ("=d") 1[
> (reg:DI 1 %edx)
> ]
> [
> (asm_input:DI ("A"))
> ]  ("bug.c") 60))
> ] ) -1 (insn_list 57 (nil))
> (nil))
> $
> 
> #define do_div(n,base) ({ \
>   unsigned long __upper, __low, __high, __mod; \
>   asm("":"=a" (__low), "=d" (__high):"A" (n)); \
>   __upper = __high; \
>   if (__high) { \
>   __upper = __high % (base); \
>   __high = __high / (base); \
>   } \
>   asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" 
> (__upper)); \
>   asm("":"=A" (n):"a" (__low),"d" (__high)); \
>   __mod; \
> })
> 
> #define u_int32_t unsigned int
> 
> struct mavenregs {
>   unsigned char regs[256];
> };
> 
> struct my_timming {
>   u_int32_t HDisplay;
>   unsigned int pixclock;
>   unsigned int mnp;
> };
> 
> struct output_desc {
>   unsigned inth_vis;
>   unsigned inth_f_porch;
>   unsigned inth_sync;
>   unsigned inth_b_porch;
>   unsigned long long int  chromasc;
>   unsigned intburst;
>   unsigned intv_total;
> };
> 
> unsigned int matroxfb_g450_setclk(unsigned int, unsigned int);
> unsigned int g450_mnp2f(unsigned int);
> 
> static void computeRegs(struct mavenregs* r, struct my_timming* mt, const 
> struct output_desc* outd) {
>   u_int32_t chromasc;
>   u_int32_t hlen;
>   u_int32_t hfp;
>   u_int32_t hvis;
>   unsigned int pixclock;
>   unsigned long long piic;
>   int mnp;
> 
>   hvis = 1;
>   piic = 10ULL * hvis;
> 
>   mnp = matroxfb_g450_setclk(piic, 3);
>   
>   mt->pixclock = g450_mnp2f(mnp);
> //printf("PX: %u\n", mt->pixclock);
>   mt->mnp = mnp;
> 
>   pixclock = 10U / mt->pixclock;
> 
>   piic = outd->chromasc;
>   do_div(piic, mt->pixclock);
>   chromasc = piic;
> 
>   r->regs[0] = chromasc >> 24;
>   r->regs[1] = chromasc >> 16;
> 
>   hfp = (((outd->h_f_porch + pixclock) / pixclock)) & ~1;
>   hlen = hvis + hfp;
> 
>   if (hlen) {
>   hfp -= hlen;
>   }
> }
> 
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Bug#151065: marked as done (g++: destructor called twice)

2002-07-12 Thread Debian Bug Tracking System
Your message dated Fri, 12 Jul 2002 09:37:52 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Not a bug: Re: Bug#151065: g++: destructor called twice
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--
Received: (at submit) by bugs.debian.org; 26 Jun 2002 13:06:47 +
>From [EMAIL PROTECTED] Wed Jun 26 08:06:47 2002
Return-path: <[EMAIL PROTECTED]>
Received: from mail.iwr.uni-heidelberg.de [129.206.104.30] 
by master.debian.org with esmtp (Exim 3.12 1 (Debian))
id 17NCVT-0003Tb-00; Wed, 26 Jun 2002 08:06:47 -0500
Received: from hal.iwr.uni-heidelberg.de (IDENT:[EMAIL PROTECTED] 
[129.206.69.248])
by mail.iwr.uni-heidelberg.de (8.11.1/8.11.1) with ESMTP id g5QD6ip12799
for <[EMAIL PROTECTED]>; Wed, 26 Jun 2002 15:06:44 +0200 (MET DST)
Received: from luft.iwr.uni-heidelberg.de ([129.206.69.130])
by hal.iwr.uni-heidelberg.de with esmtp (Exim 3.35 #1 (Debian))
id 17NCVP-0006Gf-00
for <[EMAIL PROTECTED]>; Wed, 26 Jun 2002 15:06:43 +0200
Received: from peter by luft.iwr.uni-heidelberg.de with local (Exim 3.35 #1 
(Debian))
id 17NCVC-00020q-00; Wed, 26 Jun 2002 15:06:30 +0200
From: Peter Bastian <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: g++: destructor called twice
X-Mailer: reportbug 1.50
Date: Wed, 26 Jun 2002 15:06:30 +0200
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]

Package: g++
Version: 2:2.95.4-14
Severity: normal

Hi !

We have problems with a C++ program reported in detail below.
It is not a Debian specific problem. In particular we checked:
- there is the same problem using GNU C++ compiler on SuSE Linux
  and MacOS X
- Code compiles and executes properly on MacOS using the
  CodeWarrior compiler
- Problem does not go away with g++ version 3.0

The code below compiles but when the expression
z = 3.0*x in the main function is executed the destructur of some
temporary object is called twice, leading to a segmentation
fault.

In addition there is a second problem: When the line
z = 3.0*x in main() is changed to z = x*3.0 the compiler
tries to instantiate the function template
T_leaftype operator* (double alpha, T_leaftype x) with
T_leaftype=double, but it should use the method operator*(double)
of class ScalarVector which is inherited from Vector

The code compiles and executes properly with the
CodeWarrior compiler on MacOS.

Thanks for considering this problem

>---<-
#include
#include

using namespace std;

// The base class
template 
class Vector {
public:
T_leaftype operator* (double alpha);
protected:
Vector () {}
private:
T_leaftype& asLeaf ()
{ return static_cast(*this);}
} ;

template 
inline T_leaftype Vector::operator* (double alpha)
{
T_leaftype z(asLeaf());
return z;
}

template 
inline T_leaftype operator* (double alpha, T_leaftype x)
{
return x.operator*(alpha);
}

// The derived class
class ScalarVector : public Vector {
public:
ScalarVector (int elements);
ScalarVector (const ScalarVector&);
~ScalarVector ();
private:
int n; // number of doubles
double *v; // array of values
} ;

ScalarVector::ScalarVector (int elements)
{
n = elements;
v = new double[n];
cout << "making ScalarVector v=" << v << endl;
}

ScalarVector::ScalarVector (const ScalarVector& x)
{
n = x.n;
v = new double[n];
for (int i=0; i The segmentation fault is a bug in your code, not in gcc.  A temporary
> is getting constructed, and you are using the compiler generated
> assignment operator, so you get two instances deallocating the same
> memory. Try adding a private operator=
> 
>   class ScalarVector : public Vector {
>   private:
>  ScalarVector& operator=(const ScalarVector&);
>   };
> 
> and your code will fail to compile.  Provide a suitable public
> operator= and your code should work.
> 
> 
> I believe the other problem can be simplified to
> 
> struct A {
>double operator*(double);
> };
> 
> template T operator*(double, T);
> 
> int main() {
>A a;
>a * 3.0;
> }
> 
> which gives the error
> z2.cc: In function `int main()':
> z2.cc:5: `T operator*(double, const T&) [with T = double]' must have an 
>argument of class or enumerated type
> 
> -- 
> Philip
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTE

Testsuite failure

2002-07-12 Thread bsamwel
Hi people,

I just found out that an earlier message that I sent did not actually get
sent. My previous message about testsuite failures didn't make sense
because of that. So, I'll just ask my question again.
Basically, I have the following problem building GCC 2.95.4:
- GCC seems to build fine, no compile errors.
- The testsuite (which is marked GCC-3.0.3?) then fails in all sorts of
ways, deterministically but different for every failing testcase. I get
SIGSEGVs, timeouts, internal compiler errors, etcetera. The link I
previously mentioned
(http://kebo.vlsm.org/debian-extra/dists/stable/dhidhel/experimental/gcc-2.95-4/gcc-2.95-2.95.4.ds7/build-native/gcc/testsuite/gcc.log)
gives EXACTLY the same errors, so there is at least one other person
experiencing this.- When I build GCC within a pbuilder environment I have 
exactly the same
trouble.- When I install the built GCC package, it works fine and it can compile
my 2.4.18 linux kernel just fine, and it seems to build GCC just fine as
well. When I install the GCC resulting from THAT build however I get an
internal compiler error on the first file I try to compile.
I have no clue if this is correct behaviour. If anyone wants to take a
look at this, I can give you access to my machine so you can check it out.
Please e-mail me if you are interested to take a look.
Thanks,

Bart Samwel



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]