public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/41921]  New: Cross language don't work with unnamed structs
@ 2009-11-03  6:29 pinskia at gcc dot gnu dot org
  2009-11-03  6:31 ` [Bug lto/41921] Cross language don't work with typedef " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-11-03  6:29 UTC (permalink / raw)
  To: gcc-bugs

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

With a C++ file as:
extern "C" {
  typedef struct {} CvImage;
     extern CvImage* Cv_ImageNew(void);
     }
 extern void _Raytrace(CvImage* LImage);
       int main(int LArgC, char** LArgV) 
{
  CvImage* LImage = Cv_ImageNew();
  _Raytrace(LImage);
 }
--- CUT --
And a C file as:

  typedef struct {} CvImage;
 CvImage* Cv_ImageNew(void) { }

--- CUT ---
We get an ICE when doing:
 gcc -O3 -flto -r -nostdlib t0.cc t1.c
In file included from :0:0:
t0.cc: In function ‘main’:
t0.cc:6:12: error: non-trivial conversion at assignment
struct CvImage *
struct 
{
} *
LImage_1 = D.1869_4(D);

t0.cc:6:12: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /home/apinski/change-gcc/bin/gcc returned 1 exit status
collect2: lto-wrapper returned 1 exit status


-- 
           Summary: Cross language don't work with unnamed structs
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

end of thread, other threads:[~2010-06-03 16:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03  6:29 [Bug lto/41921] New: Cross language don't work with unnamed structs pinskia at gcc dot gnu dot org
2009-11-03  6:31 ` [Bug lto/41921] Cross language don't work with typedef " pinskia at gcc dot gnu dot org
2009-11-03  6:31 ` pinskia at gcc dot gnu dot org
2009-11-03  6:35 ` pinskia at gcc dot gnu dot org
2009-11-03 10:11 ` rguenth at gcc dot gnu dot org
2009-11-03 11:46 ` [Bug c++/41921] " rguenth at gcc dot gnu dot org
2009-11-03 12:15 ` rguenth at gcc dot gnu dot org
2009-11-03 16:17 ` pinskia at gcc dot gnu dot org
2009-11-13 23:12 ` pinskia at gcc dot gnu dot org
2010-06-03 15:03 ` rguenth at gcc dot gnu dot org
2010-06-03 16:08 ` rguenth at gcc dot gnu dot org
2010-06-03 16:09 ` rguenth 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).