+2005-12-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/25254
+ PR target/24188
+ * config/i386/i386.c (x86_64_elf_select_section): If DECL is not
+ DECL_P, call get_section rather than get_named_section. Supply
+ section flags to it.
+
2005-12-14 Ben Elliston <bje@au.ibm.com>
* c-common.c (c_common_truthvalue_conversion): Generalise warning
&& ix86_in_large_data_p (decl))
{
const char *sname = NULL;
+ unsigned int flags = SECTION_WRITE;
switch (categorize_decl_for_section (decl, reloc, flag_pic))
{
case SECCAT_DATA:
break;
case SECCAT_BSS:
sname = ".lbss";
+ flags |= SECTION_BSS;
break;
case SECCAT_RODATA:
case SECCAT_RODATA_MERGE_STR:
case SECCAT_RODATA_MERGE_STR_INIT:
case SECCAT_RODATA_MERGE_CONST:
sname = ".lrodata";
+ flags = 0;
break;
case SECCAT_SRODATA:
case SECCAT_SDATA:
break;
}
if (sname)
- return get_named_section (decl, sname, reloc);
+ {
+ /* We might get called with string constants, but get_named_section
+ doesn't like them as they are not DECLs. Also, we need to set
+ flags in that case. */
+ if (!DECL_P (decl))
+ return get_section (sname, flags, NULL);
+ return get_named_section (decl, sname, reloc);
+ }
}
return default_elf_select_section (decl, reloc, align);
}
+2005-12-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/25254
+ PR target/24188
+ * gcc.target/i386/pr25254.c: New test.
+ * gfortran.dg/PR24188.f: New test.
+
2005-12-14 David Billinghurst (David.Billinghurst@riotinto.com)
* lib/fortran-torture.exp: Catch remaining uses of
--- /dev/null
+/* PR target/25254 */
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-mcmodel=medium -mlarge-data-threshold=1" } */
+
+const struct { int i; int j; } c = { 2, 6 };
+
+const char *
+foo (void)
+{
+ return "OK";
+}