patch that caused regression PR c++/7916

Janis Johnson janis187@us.ibm.com
Fri Dec 20 16:19:00 GMT 2002


The regression reported in PR c++/7916 showed up starting with this
patch:

Wed Mar 14 22:26:10 CET 2001  Jan Hubicka  <jh@suse.cz>

	* i386.c (ix86_cmodel_string, ix86_cmodel): Define.
	(override_options): Parse cmodel string.
	(x86_64_sign_extended_value, x86_64_zero_extended_value): New.
	* i386.h (TARGET_OPTIONS): Add "cmodel".
	(EXTRA_CONSTRAINT): Recognize 'e' and 'Z'.
	(enum cmodel): New.
	(ix86_cmodel_string, ix86_cmodel): Declare.

	Spot by Matt Kraai:
	* i386.h (GENERAL_REG_P): Add missing REG_P.

Here's a small test case that causes the compiler to ICE when compiled
on i686-linux.  The PR is against C++, but my testing used cc1 rather
than cc1plus.

-------------------
void foo(char *dst, char xchg, char cmp)
{
  __asm__("lock" "\tcmpxchgb %1, (%2)\t\n"
          :"=al"(cmp)
          :"dl"(xchg), "r"(dst), "al"(cmp));
}
-------------------

Output from the mainline compiler:

7916.c: In function `foo':
7916.c:6: internal compiler error: in instantiate_virtual_regs_1,
          at function.c:3898
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

I've added this information to the PR.

Jan, if the testcase itself isn't valid then please add that
information to the PR.

Janis



More information about the Gcc mailing list