public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/24248]  New: Segmentation fault on valid code w/ -O2 -finline-functions
@ 2005-10-07  1:01 halcy0n at gentoo dot org
  2005-10-07  1:02 ` [Bug c++/24248] " halcy0n at gentoo dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: halcy0n at gentoo dot org @ 2005-10-07  1:01 UTC (permalink / raw)
  To: gcc-bugs

Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.0.2/configure --prefix=/root/bin/ --disable-multilib
--enable-languages=c,c++
Thread model: posix
gcc version 4.0.2

Output of compile:
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../generic
-mtune=opteron -march=opteron -O2 -fomit-frame-pointer -ftracer -pipe -fweb
-ftree-vectorize -finline-functions -c ArcEngine.cxx -MT ArcEngine.lo -MD -MP
-MF .deps/ArcEngine.TPlo  -fPIC -DPIC -o .libs/ArcEngine.lo
../include/Attribute.h:356: warning: inline function
'OpenSP::AttributeDefinitionList::~AttributeDefinitionList()' used but never
defined
../include/Notation.h:27: warning: inline function 'virtual
OpenSP::Notation::~Notation()' used but never defined
../include/Dtd.h:30: warning: inline function 'OpenSP::Dtd::~Dtd()' used but
never defined
../include/Lpd.h:149: warning: inline function 'virtual
OpenSP::ComplexLpd::~ComplexLpd()' used but never defined
../include/Lpd.h:98: warning: inline function 'virtual
OpenSP::LinkSet::~LinkSet()' used but never defined
../include/Sd.h:28: warning: inline function 'OpenSP::Sd::~Sd()' used but never
defined
../include/CharsetInfo.h:22: warning: inline function
'OpenSP::CharsetInfo::~CharsetInfo()' used but never defined
../include/UnivCharsetDesc.h:22: warning: inline function
'OpenSP::UnivCharsetDesc::~UnivCharsetDesc()' used but never defined
../include/CharsetDecl.h:71: warning: inline function
'OpenSP::CharsetDecl::~CharsetDecl()' used but never defined
../include/Syntax.h:28: warning: inline function 'OpenSP::Syntax::~Syntax()'
used but never defined
../include/Entity.h:272: warning: inline function 'virtual
OpenSP::EntityOrigin::~EntityOrigin()' used but never defined
../include/Location.h:130: warning: inline function
'OpenSP::InputSourceOrigin::~InputSourceOrigin()' used but never defined
../include/Markup.h:41: warning: inline function 'OpenSP::Markup::~Markup()'
used but never defined
../include/ElementType.h:30: warning: inline function
'OpenSP::ElementDefinition::~ElementDefinition()' used but never defined
../include/Ptr.cxx:23: warning: inline function 'virtual
OpenSP::InputSourceOrigin::~InputSourceOrigin()' used but never defined
../include/Text.h:21: warning: inline function 'OpenSP::TextItem&
OpenSP::TextItem::operator=(const OpenSP::TextItem&)' used but never defined
../include/ContentToken.h:22: warning: inline function
'OpenSP::Transition::~Transition()' used but never defined
Recognizer.h:24: warning: inline function 'OpenSP::Recognizer::~Recognizer()'
used but never defined
../include/Message.h:132: warning: inline function
'OpenSP::OpenElementInfo::~OpenElementInfo()' used but never defined
../include/ContentToken.h:309: warning: inline function
'OpenSP::CompiledModelGroup::~CompiledModelGroup()' used but never defined
../include/Attribute.h:460: warning: inline function
'OpenSP::Attribute::~Attribute()' used but never defined
../include/Text.h:21: warning: inline function
'OpenSP::TextItem::TextItem(const OpenSP::TextItem&)' used but never defined
../include/Text.h:21: warning: inline function 'OpenSP::TextItem::~TextItem()'
used but never defined
../include/Lpd.h:27: warning: inline function
'OpenSP::ResultElementSpec::~ResultElementSpec()' used but never defined
../include/CharsetDecl.h:49: warning: inline function
'OpenSP::CharsetDeclSection::~CharsetDeclSection()' used but never defined
../include/ContentToken.h:117: warning: inline function 'virtual
OpenSP::ModelGroup::~ModelGroup()' used but never defined
../include/ContentToken.h:196: warning: inline function 'virtual
OpenSP::LeafContentToken::~LeafContentToken()' used but never defined
../include/ContentToken.h:182: warning: inline function
'OpenSP::AndInfo::~AndInfo()' used but never defined
../include/CharsetDecl.h:20: warning: inline function
'OpenSP::CharsetDeclRange::~CharsetDeclRange()' used but never defined
../include/Lpd.h:93: warning: inline function
'OpenSP::SourceLinkRuleResource::~SourceLinkRuleResource()' used but never
defined
../include/Lpd.h:71: warning: inline function
'OpenSP::SourceLinkRule::~SourceLinkRule()' used but never defined
x86_64-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
{standard input}: Assembler messages:
{standard input}:1275: Warning: end of file not at end of a line; newline
inserted

The ICE only happens with -O2 -finline-functions (or anything including those)


-- 
           Summary: Segmentation fault on valid code w/ -O2 -finline-
                    functions
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: halcy0n at gentoo dot org
 GCC build triplet: x86_64-pc-linux-gnu
  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=24248


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
@ 2005-10-07  1:02 ` halcy0n at gentoo dot org
  2005-10-07  2:01 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: halcy0n at gentoo dot org @ 2005-10-07  1:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from halcy0n at gentoo dot org  2005-10-07 01:02 -------
Created an attachment (id=9914)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9914&action=view)
Preprocessed source that causes ICE


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
  2005-10-07  1:02 ` [Bug c++/24248] " halcy0n at gentoo dot org
@ 2005-10-07  2:01 ` pinskia at gcc dot gnu dot org
  2005-10-07  2:08 ` [Bug middle-end/24248] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07  2:01 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-10-07 02:01 -------
../include/InternalInputSource.h:37: error: extra qualification
‘OpenSP::InternalInputSource::’ on member ‘asInternalInputSource’ ignored


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
  2005-10-07  1:02 ` [Bug c++/24248] " halcy0n at gentoo dot org
  2005-10-07  2:01 ` pinskia at gcc dot gnu dot org
@ 2005-10-07  2:08 ` pinskia at gcc dot gnu dot org
  2005-10-07  2:16 ` [Bug c++/24248] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07  2:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2005-10-07 02:08 -------
After fixing that error, the mainline does not segfault, the 4.0 branch still
does.

Reducing.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |4.0.3


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
                   ` (2 preceding siblings ...)
  2005-10-07  2:08 ` [Bug middle-end/24248] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-10-07  2:16 ` pinskia at gcc dot gnu dot org
  2005-10-07  2:19 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07  2:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2005-10-07 02:16 -------
I am starting to think this is a front-end bug.  Removing all lines begining
with ^# "fixes" the ICE.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |c++


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
                   ` (3 preceding siblings ...)
  2005-10-07  2:16 ` [Bug c++/24248] " pinskia at gcc dot gnu dot org
@ 2005-10-07  2:19 ` pinskia at gcc dot gnu dot org
  2005-10-07  2:21 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07  2:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2005-10-07 02:19 -------
This looks like another "pragma interface" bug.


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
                   ` (4 preceding siblings ...)
  2005-10-07  2:19 ` pinskia at gcc dot gnu dot org
@ 2005-10-07  2:21 ` pinskia at gcc dot gnu dot org
  2005-10-07  3:45 ` halcy0n at gentoo dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07  2:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2005-10-07 02:21 -------
I am starting to think this is a dup of bug 22252 because of the diagnostic we
get.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |22252
  GCC build triplet|x86_64-pc-linux-gnu         |
   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=24248


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
                   ` (5 preceding siblings ...)
  2005-10-07  2:21 ` pinskia at gcc dot gnu dot org
@ 2005-10-07  3:45 ` halcy0n at gentoo dot org
  2005-10-07  3:46 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: halcy0n at gentoo dot org @ 2005-10-07  3:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from halcy0n at gentoo dot org  2005-10-07 03:45 -------
Adding those patches into gcc-4.0.2 seems to resolve the problem.


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
                   ` (6 preceding siblings ...)
  2005-10-07  3:45 ` halcy0n at gentoo dot org
@ 2005-10-07  3:46 ` pinskia at gcc dot gnu dot org
  2005-10-17 23:54 ` reichelt at gcc dot gnu dot org
  2005-10-18 12:43 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07  3:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2005-10-07 03:46 -------
Confirmed, reduced testcase:
typedef __SIZE_TYPE__ size_t;
struct Allocator { };
template<class T> struct  Ptr {     ~Ptr();     T *ptr_;  };
template<class T> struct ConstPtr : private Ptr<T> {     ConstPtr(const Ptr<T>
&p);  };
template<class T> Ptr<T>::~Ptr() {     delete ptr_;  }
#pragma interface
struct  AttributeDefinitionList {     ConstPtr<AttributeDefinitionList> prev_; 
};
struct  Dtd {     Ptr<AttributeDefinitionList> implicitElementAttributeDef_; 
};
struct  EndElementEvent {     void *operator new(size_t sz, Allocator &alloc); 
   EndElementEvent(const ConstPtr<Dtd> &);  };
struct  ArcProcessor {     void processEndElement(Allocator &);     Ptr<Dtd>
metaDtd_;   };
void ArcProcessor::processEndElement(Allocator &alloc) {     new (alloc)
EndElementEvent( metaDtd_);   }


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-07 03:46:32
               date|                            |


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
                   ` (7 preceding siblings ...)
  2005-10-07  3:46 ` pinskia at gcc dot gnu dot org
@ 2005-10-17 23:54 ` reichelt at gcc dot gnu dot org
  2005-10-18 12:43 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-10-17 23:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from reichelt at gcc dot gnu dot org  2005-10-17 23:54 -------
Shorter testcase (ICEs with -O):

===============================================================
#pragma interface
template<typename T> struct A { T *p; ~A() { delete p; } };
template<typename T> struct B : A<T> { B(const A<T>&); };
struct C { B<C> b; C(const B<C>&); };
void foo() { new C(A<C>()); }
===============================================================


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/24248] [4.0 Regression] Segmentation fault on valid code w/ -O2 -finline-functions
  2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
                   ` (8 preceding siblings ...)
  2005-10-17 23:54 ` reichelt at gcc dot gnu dot org
@ 2005-10-18 12:43 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-18 12:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2005-10-18 12:43 -------


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


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-10-18 12:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-07  1:01 [Bug c++/24248] New: Segmentation fault on valid code w/ -O2 -finline-functions halcy0n at gentoo dot org
2005-10-07  1:02 ` [Bug c++/24248] " halcy0n at gentoo dot org
2005-10-07  2:01 ` pinskia at gcc dot gnu dot org
2005-10-07  2:08 ` [Bug middle-end/24248] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-10-07  2:16 ` [Bug c++/24248] " pinskia at gcc dot gnu dot org
2005-10-07  2:19 ` pinskia at gcc dot gnu dot org
2005-10-07  2:21 ` pinskia at gcc dot gnu dot org
2005-10-07  3:45 ` halcy0n at gentoo dot org
2005-10-07  3:46 ` pinskia at gcc dot gnu dot org
2005-10-17 23:54 ` reichelt at gcc dot gnu dot org
2005-10-18 12:43 ` pinskia at gcc dot gnu dot org

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).