pathscale/path64-suite — Issue #17: "incorrect register for operand 0" assertion during assembly phase with OpenHMPP using 12-21 nightly (C language)
Author: brycelelbach
Created: 2011-12-25 18:23:15+00:00
State: open

Kernel: Linux 3.0.0-2 (SMP, x86_64)
Distro: Debian GNU/Linux wheezy/sid
CPU: Intel Core i7-2720QM (quad-core Sandy Bridge)
Main Memory: 16GB DDR3
GPU: Quadro 1000M (Fermi), 96 CUDA cores
GPU Memory: 2GB DDR3
EKOPath version: 0.0.5 (nightlies, issue appears with both 2011-11-17 and 2011-12-21 builds)

When compiling the attached test case (matrix_add.c, a minimal matrix addition
in C99 using OpenHMPP directives), I get the following assertion when using the
2011-12-21 EKOPath nightly:

[12:19:48]:wash@pyxis:/home/wash/sandbox/openhmpp$ ~/development/pathscale/enzo-2011-12-21/bin/pathcc -hmpp matrix_add.c -o matrix_add -keep

### Assertion failure at line 1842 of /var/atlassian/application-data/bamboo/xml-data/build-dir/ENZO-NIGHTLYLINUX-RELEASE/src/enzo-suite/ekopath/compiler/src/be/cg/cgemit.cxx:
### Compiler Error in file matrix_add.c during Assembly phase:
### incorrect register for operand 0, register: <$r5>, reg_class: TOP:

With the 2011-11-17 nightly, I get a different yet equally fatal error:

[12:19:13]:wash@pyxis:/home/wash/sandbox/openhmpp$ ~/development/pathscale/enzo-2011-11-17/bin/pathcc -hmpp matrix_add.c -o matrix_add -keep
matrix_add.o: In function `main':
matrix_add.s:(.text+0x228): undefined reference to `.LC7'
matrix_add.s:(.text+0x2b4): undefined reference to `.LC8'

Without the -hmpp flag, the code compiles and runs correctly with both nightly builds.

Is my HMPP code wrong, or is this a bug?

P.S. Not sure if this is the right place to file this bug report.