Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 920269

Summary: internal compiler error
Product: Red Hat Enterprise Linux 5 Reporter: gallone
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: jason, law, mpolacek
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-23 01:56:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
preprocessed source none

Description gallone 2013-03-11 16:32:01 UTC
Created attachment 708492 [details]
preprocessed source

while compiling Slicer (git://github.com/Slicer/Slicer.git), I get the message :


[ 48%] Building CXX object Modules/Loadable/EMSegment/Qt/Logic/CMakeFiles/vtkSlicerEMSegmentModuleLogic.dir/__/__/Registration/vtkRigidRegistrator.cxx.o
/Local/Apps/Slicerbin/EMSegment/Registration/vtkRigidRegistrator.cxx:746: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cccy7pkGX.out file, please attach this to your bugreport.
make[2]: *** [Modules/Loadable/EMSegment/Qt/Logic/CMakeFiles/vtkSlicerEMSegmentModuleLogic.dir/__/__/Registration/vtkRigidRegistrator.cxx.o] Error 1
make[1]: *** [Modules/Loadable/EMSegment/Qt/Logic/CMakeFiles/vtkSlicerEMSegmentModuleLogic.dir/all] Error 2
make: *** [all] Error 2

Comment 1 Jakub Jelinek 2013-03-21 18:32:08 UTC
Reduced testcase for -g:
class A
{
  void a1 ();
  template <class T>
  void a2 ();
  template <class T, class U>
  void a2 ();
  template <class V>
  void a3 ();
};
template <class T, class U>
struct B
{
  typedef T TT;
};
template <class T, unsigned int V = 2>
class C {};
template <class T, class U>
class D {};
template <class T, class U>
struct E : public D <T, U>
{
  struct F {};
  typedef F G __attribute__ ((aligned (64)));
};
template <class V>
struct H
{
  typedef float I;
};
template <class T>
void
A::a3 ()
{
  typedef C <T, 3> J;
  typedef E <J, J> K;
  typename K::L l = K::k ();
}
template <class T, class U>
void
A::a2 ()
{
  typedef B <T, U> TraitsType;
  typedef typename TraitsType::TT CommonCVoxelType;
  typedef typename H <CommonCVoxelType>::I I;
  this->a3 <I> ();
}
template <class T>
void
A::a2 ()
{
  a2 <T, double> ();
}
void
A::a1 ()
{
  a2 <double> ();
}

I bet the typedef of a struct with aligned attribute is the problem, that had been supported really badly in older compilers.

Comment 2 Jakub Jelinek 2013-03-21 19:09:55 UTC
Indeed, http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128488 fixed this,
not sure how risky the backport would be at this point.

Comment 3 Jeff Law 2013-03-21 20:00:45 UTC
Setting proper component.

Comment 6 Jeff Law 2013-03-23 01:56:28 UTC
Based on feedback from Jakub & Jason, the fix for this problem is too risky to backport to the gcc 4.1 toolchain on Red Hat Enterprise Linux 5.

The gcc44 compiler for Red Hat Enterprise Linux 5 as well as the Developer Toolset releases for Red Hat Enterprise Linux 5 handle this code correctly.