public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/42874]  New: Error on correct code
@ 2010-01-26 15:58 krebbel at gcc dot gnu dot org
  2010-01-26 22:32 ` [Bug middle-end/42874] [4.5 Regression] Error on correct code: sorry, unimplemented: function ‘foo’ can never be copied because it uses rguenth at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2010-01-26 15:58 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]

The following testcase fails with:
sorry, unimplemented: function ‘foo’ can never be copied because it uses
variable sized variables

When compiled with at least -O1. It works fine with GCC 4.4.3.

void __attribute__ ((always_inline))
foo (const unsigned long *addr, unsigned long size)
{
  typedef struct
  {
    long x[size];
  } addrtype;

  addrtype *a = (void *) addr;
}

Unfortunately these patterns are quite common in the Linux kernel - at least
for S/390. They always used to compile but mainline currently is not able to
build the kernel.


-- 
           Summary: Error on correct code
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: krebbel at gcc dot gnu dot org
 GCC build triplet: s390x-ibm-linux
  GCC host triplet: s390x-ibm-linux
GCC target triplet: s390x-ibm-linux


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-02-07  4:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-26 15:58 [Bug c/42874] New: Error on correct code krebbel at gcc dot gnu dot org
2010-01-26 22:32 ` [Bug middle-end/42874] [4.5 Regression] Error on correct code: sorry, unimplemented: function ‘foo’ can never be copied because it uses rguenth at gcc dot gnu dot org
2010-01-27  8:39 ` jakub at gcc dot gnu dot org
2010-01-27  8:43 ` pinskia at gcc dot gnu dot org
2010-01-27  8:51 ` jakub at gcc dot gnu dot org
2010-01-27  9:08 ` jakub at gcc dot gnu dot org
2010-01-27 10:24 ` rguenth at gcc dot gnu dot org
2010-01-27 15:10 ` jakub at gcc dot gnu dot org
2010-01-27 15:21 ` jakub at gcc dot gnu dot org
2010-02-07  4:46 ` hjl at gcc dot gnu dot org

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).