public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Troubles with only GCC3.4.2
@ 2005-05-11 11:26 Andrey M Linkevich
  0 siblings, 0 replies; only message in thread
From: Andrey M Linkevich @ 2005-05-11 11:26 UTC (permalink / raw)
  To: gcc-bugs

[-- Attachment #1: Type: text/plain, Size: 2561 bytes --]

Hi

Help!

cc1plus is coredump only for GCC 3.4.2

1) BAD

See Node_gcc342.cc Node_gcc342.ii

$ g++ -v -save-temps -O0 -o Node_gcc342 Node_gcc342.cc
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.2 [FreeBSD] 20040728
 /usr/libexec/cc1plus -E -quiet -v -D_LONGLONG Node_gcc342.cc -O0 -o Node_gcc342.ii
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/3.4
 /usr/include/c++/3.4/backward
 /usr/include
End of search list.
 /usr/libexec/cc1plus -fpreprocessed Node_gcc342.ii -quiet -dumpbase Node_gcc342.cc -auxbase Node_gcc342 -O0 -version -o Node_gcc342.s
GNU C++ version 3.4.2 [FreeBSD] 20040728 (i386-fbsdproj-freebsd)
        compiled by GNU C version 3.4.2 [FreeBSD] 20040728.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
g++: Internal error: Illegal instruction (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

2) Good

On GCC 3.3.3 - compile is Ok

See Node_gcc333.cc Node_gcc333.ii

$ g++ -v -save-temps -O0 -o Node_gcc333 Node_gcc333.cc
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.3.3 [FreeBSD] 20031106
 /usr/libexec/cc1plus -E -D__GNUG__=3 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=3 -D_LONGLONG Node_gcc333.cc -O0 Node_gcc333.ii
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/3.3
 /usr/include/c++/3.3/backward
 /usr/include
End of search list.
 /usr/libexec/cc1plus -fpreprocessed Node_gcc333.ii -quiet -dumpbase Node_gcc333.cc -auxbase Node_gcc333 -O0 -version -o Node_gcc333.s
GNU C++ version 3.3.3 [FreeBSD] 20031106 (i386-undermydesk-freebsd)
        compiled by GNU C version 3.3.3 [FreeBSD] 20031106.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 /usr/bin/as -v -o Node_gcc333.o Node_gcc333.s
GNU assembler version 2.13.2 [FreeBSD] 2002-11-27 (i386-obrien-freebsd5) using BFD version 2.13.2 [FreeBSD] 2002-11-27
 /usr/bin/ld -V -dynamic-linker /libexec/ld-elf.so.1 -o Node_gcc333 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib Node_gcc333.o -lstdc++ -lm -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
GNU ld version 2.13.2 [FreeBSD] 2002-11-27
  Supported emulations:
   elf_i386_fbsd

Please help %-)

-- 
System Administrator                RMTelecom
Andrey M Linkevich                                NOC

[-- Attachment #2: Node_gcc342.cc --]
[-- Type: text/x-c++src, Size: 1252 bytes --]

extern "C"
{
void bcopy(const void *, void *, int);
}

class TestNodeKey;
class TestNodeValue;



template <typename T>
    class NodePart
    {
    public:
	NodePart(void);

	NodePart(const NodePart<T>& Src);
    };

template <typename T>
    inline
    NodePart<T>::NodePart(void)
    { }

template <typename T>
    inline
    NodePart<T>::NodePart(const NodePart<T>& Src)
    { ::bcopy(&Src, this, sizeof(T)); }



class TestNodeKey : public NodePart<TestNodeKey>
{
public:
    char C __attribute__ ((packed));
};



class TestNodeValue : public NodePart<TestNodeValue>
{
public:
    long L __attribute__ ((packed));
};



template <typename K, typename V>
    class Node
    {
    public:
	K Key __attribute__ ((packed));

	V Value __attribute__ ((packed));

	Node(void);

	Node(const Node<K, V>& Src);
    };

template <typename K, typename V>
    inline
    Node<K, V>::Node(void)
    { }

template <typename K, typename V>
    inline
    Node<K, V>::Node(const Node<K, V>& Src)
    {
	this->Key = Src.Key;
	this->Value = Src.Value;
    }



class TestNode : public Node<TestNodeKey, TestNodeValue>
{
public:
};



int
main (int ArgC, char* ArgV[])
{
    TestNode TN1;
    TestNode TN2 = TN1;
//    TestNode TN2;
//    TN2 = TN1;
    return 0;
}

[-- Attachment #3: Node_gcc342.ii --]
[-- Type: text/x-c++src, Size: 1256 bytes --]

# 1 "Node_gcc342.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "Node_gcc342.cc"
extern "C"
{
void bcopy(const void *, void *, int);
}



template <typename T>
    class NodePart
    {
    public:
 NodePart(void);

 NodePart(const NodePart<T>& Src);
    };

template <typename T>
    inline
    NodePart<T>::NodePart(void)
    { }

template <typename T>
    inline
    NodePart<T>::NodePart(const NodePart<T>& Src)
    { ::bcopy(&Src, this, sizeof(T)); }



class TestNodeKey : public NodePart<TestNodeKey>
{
public:
    char C __attribute__ ((packed));
};



class TestNodeValue : public NodePart<TestNodeValue>
{
public:
    long L __attribute__ ((packed));
};



template <typename K, typename V>
    class Node
    {
    public:
 K Key __attribute__ ((packed));

 V Value __attribute__ ((packed));

 Node(void);

 Node(const Node<K, V>& Src);
    };

template <typename K, typename V>
    inline
    Node<K, V>::Node(void)
    { }

template <typename K, typename V>
    inline
    Node<K, V>::Node(const Node<K, V>& Src)
    {
 this->Key = Src.Key;
 this->Value = Src.Value;
    }



class TestNode : public Node<TestNodeKey, TestNodeValue>
{
public:
};



int
main (int ArgC, char* ArgV[])
{
    TestNode TN1;
    TestNode TN2 = TN1;


    return 0;
}

[-- Attachment #4: Node_gcc333.cc --]
[-- Type: text/x-c++src, Size: 1252 bytes --]

extern "C"
{
void bcopy(const void *, void *, int);
}

class TestNodeKey;
class TestNodeValue;



template <typename T>
    class NodePart
    {
    public:
	NodePart(void);

	NodePart(const NodePart<T>& Src);
    };

template <typename T>
    inline
    NodePart<T>::NodePart(void)
    { }

template <typename T>
    inline
    NodePart<T>::NodePart(const NodePart<T>& Src)
    { ::bcopy(&Src, this, sizeof(T)); }



class TestNodeKey : public NodePart<TestNodeKey>
{
public:
    char C __attribute__ ((packed));
};



class TestNodeValue : public NodePart<TestNodeValue>
{
public:
    long L __attribute__ ((packed));
};



template <typename K, typename V>
    class Node
    {
    public:
	K Key __attribute__ ((packed));

	V Value __attribute__ ((packed));

	Node(void);

	Node(const Node<K, V>& Src);
    };

template <typename K, typename V>
    inline
    Node<K, V>::Node(void)
    { }

template <typename K, typename V>
    inline
    Node<K, V>::Node(const Node<K, V>& Src)
    {
	this->Key = Src.Key;
	this->Value = Src.Value;
    }



class TestNode : public Node<TestNodeKey, TestNodeValue>
{
public:
};



int
main (int ArgC, char* ArgV[])
{
    TestNode TN1;
    TestNode TN2 = TN1;
//    TestNode TN2;
//    TN2 = TN1;
    return 0;
}

[-- Attachment #5: Node_gcc333.ii --]
[-- Type: text/x-c++src, Size: 1353 bytes --]

# 1 "Node_gcc333.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "Node_gcc333.cc"
extern "C"
{
void bcopy(const void *, void *, int);
}

class TestNodeKey;
class TestNodeValue;



template <typename T>
    class NodePart
    {
    public:
        NodePart(void);

        NodePart(const NodePart<T>& Src);
    };

template <typename T>
    inline
    NodePart<T>::NodePart(void)
    { }

template <typename T>
    inline
    NodePart<T>::NodePart(const NodePart<T>& Src)
    { ::bcopy(&Src, this, sizeof(T)); }



class TestNodeKey : public NodePart<TestNodeKey>
{
public:
    char C __attribute__ ((packed));
};



class TestNodeValue : public NodePart<TestNodeValue>
{
public:
    long L __attribute__ ((packed));
};



template <typename K, typename V>
    class Node
    {
    public:
        K Key __attribute__ ((packed));

        V Value __attribute__ ((packed));

        Node(void);

        Node(const Node<K, V>& Src);
    };

template <typename K, typename V>
    inline
    Node<K, V>::Node(void)
    { }

template <typename K, typename V>
    inline
    Node<K, V>::Node(const Node<K, V>& Src)
    {
        this->Key = Src.Key;
        this->Value = Src.Value;
    }



class TestNode : public Node<TestNodeKey, TestNodeValue>
{
public:
};



int
main (int ArgC, char* ArgV[])
{
    TestNode TN1;
    TestNode TN2 = TN1;


    return 0;
}

[-- Attachment #6: Node_gcc333.s --]
[-- Type: text/plain, Size: 4516 bytes --]

	.file	"Node_gcc333.cc"
	.text
	.p2align 1,0x90
	.p2align 2,,3
.globl main
	.type	main, @function
main:
.LFB31:
	pushl	%ebp
.LCFI0:
	movl	%esp, %ebp
.LCFI1:
	subl	$40, %esp
.LCFI2:
	andl	$-16, %esp
	movl	$0, %eax
	subl	%eax, %esp
	subl	$12, %esp
	leal	-24(%ebp), %eax
	pushl	%eax
.LCFI3:
	call	_ZN8TestNodeC1Ev
	addl	$16, %esp
	subl	$8, %esp
	leal	-24(%ebp), %eax
	pushl	%eax
	leal	-40(%ebp), %eax
	pushl	%eax
	call	_ZN8TestNodeC1ERKS_
	addl	$16, %esp
	movl	$0, %eax
	leave
	ret
.LFE31:
	.size	main, .-main
	.section	.gnu.linkonce.t._ZN8TestNodeC1Ev,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN8TestNodeC1Ev
	.type	_ZN8TestNodeC1Ev, @function
_ZN8TestNodeC1Ev:
.LFB32:
	pushl	%ebp
.LCFI4:
	movl	%esp, %ebp
.LCFI5:
	subl	$8, %esp
.LCFI6:
	subl	$12, %esp
	pushl	8(%ebp)
.LCFI7:
	call	_ZN4NodeI11TestNodeKey13TestNodeValueEC2Ev
	addl	$16, %esp
	leave
	ret
.LFE32:
	.size	_ZN8TestNodeC1Ev, .-_ZN8TestNodeC1Ev
	.section	.gnu.linkonce.t._ZN8TestNodeC1ERKS_,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN8TestNodeC1ERKS_
	.type	_ZN8TestNodeC1ERKS_, @function
_ZN8TestNodeC1ERKS_:
.LFB33:
	pushl	%ebp
.LCFI8:
	movl	%esp, %ebp
.LCFI9:
	subl	$8, %esp
.LCFI10:
	subl	$8, %esp
	pushl	12(%ebp)
	pushl	8(%ebp)
.LCFI11:
	call	_ZN4NodeI11TestNodeKey13TestNodeValueEC2ERKS2_
	addl	$16, %esp
	leave
	ret
.LFE33:
	.size	_ZN8TestNodeC1ERKS_, .-_ZN8TestNodeC1ERKS_
	.section	.gnu.linkonce.t._ZN4NodeI11TestNodeKey13TestNodeValueEC2Ev,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN4NodeI11TestNodeKey13TestNodeValueEC2Ev
	.type	_ZN4NodeI11TestNodeKey13TestNodeValueEC2Ev, @function
_ZN4NodeI11TestNodeKey13TestNodeValueEC2Ev:
.LFB34:
	pushl	%ebp
.LCFI12:
	movl	%esp, %ebp
.LCFI13:
	subl	$8, %esp
.LCFI14:
	subl	$12, %esp
	pushl	8(%ebp)
.LCFI15:
	call	_ZN11TestNodeKeyC1Ev
	addl	$16, %esp
	subl	$12, %esp
	movl	8(%ebp), %eax
	incl	%eax
	pushl	%eax
	call	_ZN13TestNodeValueC1Ev
	addl	$16, %esp
	leave
	ret
.LFE34:
	.size	_ZN4NodeI11TestNodeKey13TestNodeValueEC2Ev, .-_ZN4NodeI11TestNodeKey13TestNodeValueEC2Ev
	.section	.gnu.linkonce.t._ZN4NodeI11TestNodeKey13TestNodeValueEC2ERKS2_,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN4NodeI11TestNodeKey13TestNodeValueEC2ERKS2_
	.type	_ZN4NodeI11TestNodeKey13TestNodeValueEC2ERKS2_, @function
_ZN4NodeI11TestNodeKey13TestNodeValueEC2ERKS2_:
.LFB35:
	pushl	%ebp
.LCFI16:
	movl	%esp, %ebp
.LCFI17:
	subl	$8, %esp
.LCFI18:
	subl	$12, %esp
	pushl	8(%ebp)
.LCFI19:
	call	_ZN11TestNodeKeyC1Ev
	addl	$16, %esp
	subl	$12, %esp
	movl	8(%ebp), %eax
	incl	%eax
	pushl	%eax
	call	_ZN13TestNodeValueC1Ev
	addl	$16, %esp
	movl	8(%ebp), %edx
	movl	12(%ebp), %eax
	movb	(%eax), %al
	movb	%al, (%edx)
	movl	8(%ebp), %edx
	incl	%edx
	movl	12(%ebp), %eax
	incl	%eax
	movl	(%eax), %eax
	movl	%eax, (%edx)
	leave
	ret
.LFE35:
	.size	_ZN4NodeI11TestNodeKey13TestNodeValueEC2ERKS2_, .-_ZN4NodeI11TestNodeKey13TestNodeValueEC2ERKS2_
	.section	.gnu.linkonce.t._ZN11TestNodeKeyC1Ev,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN11TestNodeKeyC1Ev
	.type	_ZN11TestNodeKeyC1Ev, @function
_ZN11TestNodeKeyC1Ev:
.LFB36:
	pushl	%ebp
.LCFI20:
	movl	%esp, %ebp
.LCFI21:
	subl	$8, %esp
.LCFI22:
	subl	$12, %esp
	pushl	8(%ebp)
.LCFI23:
	call	_ZN8NodePartI11TestNodeKeyEC2Ev
	addl	$16, %esp
	leave
	ret
.LFE36:
	.size	_ZN11TestNodeKeyC1Ev, .-_ZN11TestNodeKeyC1Ev
	.section	.gnu.linkonce.t._ZN13TestNodeValueC1Ev,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN13TestNodeValueC1Ev
	.type	_ZN13TestNodeValueC1Ev, @function
_ZN13TestNodeValueC1Ev:
.LFB37:
	pushl	%ebp
.LCFI24:
	movl	%esp, %ebp
.LCFI25:
	subl	$8, %esp
.LCFI26:
	subl	$12, %esp
	pushl	8(%ebp)
.LCFI27:
	call	_ZN8NodePartI13TestNodeValueEC2Ev
	addl	$16, %esp
	leave
	ret
.LFE37:
	.size	_ZN13TestNodeValueC1Ev, .-_ZN13TestNodeValueC1Ev
	.section	.gnu.linkonce.t._ZN8NodePartI11TestNodeKeyEC2Ev,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN8NodePartI11TestNodeKeyEC2Ev
	.type	_ZN8NodePartI11TestNodeKeyEC2Ev, @function
_ZN8NodePartI11TestNodeKeyEC2Ev:
.LFB38:
	pushl	%ebp
.LCFI28:
	movl	%esp, %ebp
.LCFI29:
	leave
	ret
.LFE38:
	.size	_ZN8NodePartI11TestNodeKeyEC2Ev, .-_ZN8NodePartI11TestNodeKeyEC2Ev
	.section	.gnu.linkonce.t._ZN8NodePartI13TestNodeValueEC2Ev,"ax",@progbits
	.p2align 1
	.p2align 2,,3
	.weak	_ZN8NodePartI13TestNodeValueEC2Ev
	.type	_ZN8NodePartI13TestNodeValueEC2Ev, @function
_ZN8NodePartI13TestNodeValueEC2Ev:
.LFB39:
	pushl	%ebp
.LCFI30:
	movl	%esp, %ebp
.LCFI31:
	leave
	ret
.LFE39:
	.size	_ZN8NodePartI13TestNodeValueEC2Ev, .-_ZN8NodePartI13TestNodeValueEC2Ev
	.ident	"GCC: (GNU) 3.3.3 [FreeBSD] 20031106"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-11 11:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-11 11:26 Troubles with only GCC3.4.2 Andrey M Linkevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).