Hide Forgot
Description of problem: When trying to compile the following C++ source code, gcc crashes: template<typename T> bool ref(T &x) { asm goto("jz %l[no]" : : : : no); return true; no: return false; } int main(int argc, char **argv) { return ref(argc); } Version-Release number of selected component (if applicable): gcc-4.6.2-1.fc16.x86_64 gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) How reproducible: Always Steps to Reproduce: 1. Compile the above program Actual results: GCC crashes: <stdin>: In function ‘bool ref(T&) [with T = int]’: <stdin>:1:158: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Expected results: The code is compiled. Additional info: GCC developers do not usually like bug reports on patched GCC versions, so I am reporting first to Fedora.
Tracking this upstream - http://gcc.gnu.org/PR52247