public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/47908] New: attribute((optimize(2))) causes ICE in m68k_sched_issue_rate
Date: Sat, 26 Feb 2011 20:59:00 -0000	[thread overview]
Message-ID: <bug-47908-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47908

           Summary: attribute((optimize(2))) causes ICE in
                    m68k_sched_issue_rate
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mikpe@it.uu.se


When targeting m68k-linux, if a function declaration has
__attribute__((__optimize__(2))), then gcc ICEs in m68k_sched_issue_rate:

> cat O16384.c
__attribute__((__optimize__(2))) void foo (void) { }
> objdir/gcc/xgcc -Bobjdir/gcc -S O16384.c
O16384.c: In function 'foo':
O16384.c:1:1: internal compiler error: in m68k_sched_issue_rate, at
config/m68k/m68k.c:6055
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The immediate cause is that m68k_sched_cpu indicates a non-ColdFire target, and
m68k_sched_issue_rate explicitly calls gcc_unreachable in that case.  I don't
know why attribute((optimize(2))) causes scheduling to be attempted, esp. since
m68k_option_override seems to disable a number of scheduling-related flags.

This bug causes gcc.dg/O16384.c to fail with gcc-4.4.5/4.5.2/4.6.0 on
m68k-linux.  With gcc-4.3.5 the optimize attribute is ignored and there is no
ICE.

> objdir/gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=objdir/gcc/xgcc
Target: m68k-unknown-linux
Configured with: /tmp/gcc-4.6-20110219/configure --target=m68k-unknown-linux
--prefix=/home/mikpe/pkgs/linux-x86/cross-m68k
--with-gmp=/home/mikpe/pkgs/linux-x86/gmp-4.3.2
--with-mpfr=/home/mikpe/pkgs/linux-x86/mpfr-2.4.2
--with-mpc=/home/mikpe/pkgs/linux-x86/mpc-0.8.2 --disable-plugin --disable-lto
--disable-nls --enable-shared --disable-libmudflap --disable-multilib
--enable-threads=posix --enable-checking=release --enable-languages=c
Thread model: posix
gcc version 4.6.0 20110219 (experimental) (GCC)


             reply	other threads:[~2011-02-26 20:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26 20:59 mikpe at it dot uu.se [this message]
2011-02-26 21:33 ` [Bug target/47908] " mikpe at it dot uu.se
2011-03-01 23:45 ` mikpe at it dot uu.se
2011-04-10 18:36 ` alanh at fairlite dot co.uk
2011-04-11  7:36 ` mikpe at it dot uu.se
2011-07-26 20:57 ` schwab@linux-m68k.org
2011-07-27 23:29 ` tg at mirbsd dot org
2011-07-29 11:44 ` mikpe at it dot uu.se
2011-07-31 15:01 ` schwab at gcc dot gnu.org
2011-07-31 15:09 ` schwab at gcc dot gnu.org
2011-08-01 13:45 ` owner at bugs dot debian.org
2011-08-22 12:04 ` schwab@linux-m68k.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47908-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).