Bug 51670 - [4.7.0] conflicts with new declaration with 'C++' linkage
Summary: [4.7.0] conflicts with new declaration with 'C++' linkage
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2011-12-23 23:46 UTC by Igor Pashev
Modified: 2011-12-24 18:39 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-pc-solaris2.11
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Build log (899 bytes, text/x-log)
2011-12-23 23:46 UTC, Igor Pashev
Details
Trivial test program (66 bytes, text/plain)
2011-12-23 23:47 UTC, Igor Pashev
Details
/usr/gcc/4.6/bin/g++ -m64 -E test.cpp -o test.46 (6.37 KB, application/octet-stream)
2011-12-23 23:48 UTC, Igor Pashev
Details
/usr/bin/g++-4.7 -E test.cpp -o test.47 (6.52 KB, application/octet-stream)
2011-12-23 23:48 UTC, Igor Pashev
Details
Diff of test.46 and test.47 (2.86 KB, patch)
2011-12-23 23:49 UTC, Igor Pashev
Details | Diff
Diff of macros (4.30 KB, patch)
2011-12-24 00:27 UTC, Igor Pashev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Pashev 2011-12-23 23:46:40 UTC
Created attachment 26174 [details]
Build log

G++ 4.7.0 (trunk from 20111219) compiler doesn't work on Solaris (x86_64-pc-solaris2.11).

But G++ 4.6.2 does.

Steps to reproduce:

# /usr/gcc/4.7/bin/g++ test.cpp -o test # FAIL
# /usr/gcc/4.6/bin/g++ -m64  test.cpp -o test # WIN

Build log is attached. Trivial test program and preprocessed files are below.
Comment 1 Igor Pashev 2011-12-23 23:47:20 UTC
Created attachment 26175 [details]
Trivial test program
Comment 2 Igor Pashev 2011-12-23 23:48:01 UTC
Created attachment 26176 [details]
/usr/gcc/4.6/bin/g++ -m64  -E test.cpp -o test.46
Comment 3 Igor Pashev 2011-12-23 23:48:35 UTC
Created attachment 26177 [details]
/usr/bin/g++-4.7 -E test.cpp -o test.47
Comment 4 Igor Pashev 2011-12-23 23:49:12 UTC
Created attachment 26178 [details]
Diff of test.46 and test.47
Comment 5 Igor Pashev 2011-12-23 23:51:31 UTC
Sorry, GCC 4.7 is installed in /usr, not in /usr/gcc/4.7
Comment 6 Andrew Pinski 2011-12-23 23:53:05 UTC
This looks like a bug in Solaris's headers.
Comment 7 Igor Pashev 2011-12-24 00:27:10 UTC
Created attachment 26179 [details]
Diff of macros
Comment 8 Marc Glisse 2011-12-24 09:40:54 UTC
This is supposed to be handled by fixinclude in the solaris_cxx_linkage rule. Can you try and see why it isn't applied?
Comment 9 Igor Pashev 2011-12-24 18:39:49 UTC
(In reply to comment #8)
> This is supposed to be handled by fixinclude in the solaris_cxx_linkage rule.
> Can you try and see why it isn't applied?

Well, I'm a little confused.

Directory /usr/lib/gcc/x86_64-pc-solaris2.11/4.7/include-fixed was mostly empty.
I run /usr/lib/gcc/x86_64-pc-solaris2.11/4.7/install-tools/mkheaders, and now that directory is full on fixed headers.

Now g++ does work.


BTW GCC 4.6.2 in Solaris ships all possible fixed headers :-\