View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000523 | VTK | (No Category) | public | 2004-01-16 11:17 | 2007-08-28 11:46 | ||||
Reporter | Demian Nave | ||||||||
Assigned To | |||||||||
Priority | high | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000523: Imaging/vtkImageLogic.cxx causes GCC 3.2 internal compiler error with SSE2 enabled | ||||||||
Description | Thought someone might know what to do with this. Set CMAKE_CXX_FLAGS="-msse2 -mfpmath=sse" and build Imaging/vtkImageLogic.cxx with GCC3.2.{2,3} to see the error. Make trueValue in vtkImageLogicExecute1() a volatile variable to fix the problem: volatile T trueValue = (T)(self->GetOutputTrueValue()); I have verified this error on GCC 3.2.2 on RH9-x86 and GCC 3.2.3 on RHEW3-x86_64. Cheers, Demian | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0000499) Mathieu Malaterre (developer) 2004-01-18 11:00 |
Could not reproduce any bad behavior with gcc 3.3.2. Plus: $ cat /proc/cpuinfo reveal that zorglub has sse and sse2. But most important thing, VTK doesn't make use of any MMX, SSE or SSE2 call. I suggest we close this bug. |
(0000502) Demian Nave (reporter) 2004-01-18 14:18 |
This has nothing to do with VTK's explicit use of SSE or SSE2---it is an issue with trying to use GCC to AUTOMATICALLY compile SSE/SSE2 versions of VTK floating-point operations. Although I will be putting this bug onto GCC's bug tracker, let me try again here with a specific example and perhaps this problem will not get dismissed so easily if other users experience the same issue: Compiling VTK-4.2 with RedHat 9.0 on a Pentium4, using the RedHat Network update configuration of GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) use ccmake to set CMAKE_CXX_FLAGS to "-O2 -msse -msse2", have ccmake rebuild the Makefiles, then, compile vtkImageLogic.cxx, assuming a build directory of VTK42: % cd VTK42/Imaging % make vtkImageLogic.o Building object file vtkImageLogic.o... /usr/local/itk/VTK-4.2/Imaging/vtkImageLogic.cxx: In function `void vtkImageLogicExecute1(vtkImageLogic*, vtkImageData*, vtkImageData*, int*, int, T*) [with T = VTK_TT]': /usr/local/itk/VTK-4.2/Imaging/vtkImageLogic.cxx:240: instantiated from here /usr/local/itk/VTK-4.2/Imaging/vtkImageLogic.cxx:91: could not split insn (insn 439 495 442 (set (reg:DF 21 rxmm0 [99]) (if_then_else:DF (ne (mem:DF (reg/v/f:SI 1 edx [78]) [35 S8 A64]) (reg:DF 21 rxmm0 [99])) (reg:DF 23 rxmm2) (const_double:DF 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0]))) 659 {*ss e_movdfcc_const0_3} (insn_list 495 (insn_list 492 (nil))) (expr_list:REG_DEAD (reg:DF 23 rxmm2) (expr_list:REG_EQUIV (mem:DF (reg/v/f:SI 0 eax [81]) [35 S8 A64]) (nil)))) /usr/local/itk/VTK-4.2/Imaging/vtkImageLogic.cxx:91: Internal compiler error in final_scan_insn, at final.c:2622 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> [^] for instructions. make[1]: *** [vtkImageLogic.o] Error 1 make: *** [default_target] Error 2 Exit 2 As I said in my original post, the compiler fails with an ICE. This is the build line from Imaging/Makefile: vtkImageLogic.o: /usr/local/itk/VTK-4.2/Imaging/vtkImageLogic.cxx @echo "Building object file vtkImageLogic.o..." c++ -o vtkImageLogic.o -DvtkImaging_EXPORTS -O2 -msse2 -mfpmath=sse -Wno-deprecated -I/usr/X11R6/include -fPIC $(INCLUDE_FLAGS) -c /usr/local/itk/VTK-4.2/Imaging/vtkImageLogic.cxx You can also try building vtkImageLogic.o right from a command prompt, and you get the same error. Now, add in the 'volatile' qualifier onto the declaration volatile T trueValue = (T)(self->GetOutputTrueValue()); in the function vtkImageLogicExecute1(), and recompile: % make vtkImageLogic.o Building object file vtkImageLogic.o... Success. Cheers, Demian |
(0000503) Demian Nave (reporter) 2004-01-18 14:21 |
I should mention that my original post omitted "-O2" from CMAKE_CXX_FLAGS, which may have been the reason for not seeing the ICE. Cheers, Demian |
(0000508) Mathieu Malaterre (developer) 2004-01-18 18:07 |
Changed CMAKE_CXX_FLAGS to '-O2 -march=pentium4 -mfpmath=sse -msse2' and could not reproduce using gcc 3.3.2 (fedora). Demian, did you read that thread: http://gcc.gnu.org/ml/gcc/2002-05/msg00253.html [^] It appears to me as this is a bug in gcc when you don't specify -march=pentium4. I suggest -again- we close this bug. |
(0000509) Demian Nave (reporter) 2004-01-18 18:21 |
I got a response with respect to my GCC bug-list report, so this can certainly be closed. I wanted to make sure that this bug was known to VTK users with RedHat 9 systems with the broken GCC 3.2.2. Cheers, Demian |
(0000510) Mathieu Malaterre (developer) 2004-01-18 18:29 |
Adding URL to gcc bugzilla: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12918 [^] |
(0000648) Mathieu Malaterre (developer) 2004-02-15 23:30 |
Adding another ressource: http://gcc.gnu.org/ml/gcc-bugs/2003-01/msg00991.html [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2007-08-28 11:45 | Zack Galbreath | Note Deleted: 0008301 | |
2007-08-28 11:46 | Zack Galbreath | Assigned To | Andy Wilson => |
2007-08-28 11:46 | Zack Galbreath | Status | backlog => closed |
2007-08-28 11:46 | Zack Galbreath | Summary | Goodsite => Imaging/vtkImageLogic.cxx causes GCC 3.2 internal compiler error with SSE2 enabled |
2007-08-28 11:46 | Zack Galbreath | Project | @16@ => VTK |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |