public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/42954]  New: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry)
@ 2010-02-04 12:31 burnus at gcc dot gnu dot org
  2010-02-04 13:03 ` [Bug fortran/42954] " dfranke at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-04 12:31 UTC (permalink / raw)
  To: gcc-bugs

gcc/fortran/cpp.c contains:

  /* FIXME: Pandora's Box
    Using the macros below results in multiple breakages:
     - mingw will fail to compile this file as dependent macros
       assume to be used in c-cppbuiltin.c only. Further, they use
       flags only valid/defined in C (same as noted above).
       [config/i386/mingw32.h, config/i386/cygming.h]
     - other platforms (not as popular) break similarly
       [grep for 'builtin_define_with_int_value' in gcc/config/]

  TARGET_CPU_CPP_BUILTINS ();
  TARGET_OS_CPP_BUILTINS ();
  TARGET_OBJFMT_CPP_BUILTINS (); */


Grepping for builtin_define_with_int_value shows:

gcc/config/frv/frv.h
gcc/config/i386/mingw32.h
gcc/config/mips/mips.h
gcc/config/freebsd-spec.h


Expected: The macros which make only sense for C are only used for C, e.g. many
of the __attribute__(()) ones.


-- 
           Summary: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues
                    (MinGW, FreeBSD, MIPS, Fry)
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

* [Bug fortran/42954] gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry)
  2010-02-04 12:31 [Bug fortran/42954] New: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry) burnus at gcc dot gnu dot org
@ 2010-02-04 13:03 ` dfranke at gcc dot gnu dot org
  2010-02-04 14:06 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-02-04 13:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2010-02-04 13:03 -------
*** Bug 36380 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug fortran/42954] gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry)
  2010-02-04 12:31 [Bug fortran/42954] New: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry) burnus at gcc dot gnu dot org
  2010-02-04 13:03 ` [Bug fortran/42954] " dfranke at gcc dot gnu dot org
@ 2010-02-04 14:06 ` burnus at gcc dot gnu dot org
  2010-02-10 23:40 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-04 14:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2010-02-04 14:06 -------
Daniel: Wouldn't it be enough to duplicate c-cppbuiltin.c's
builtin_define_with_value and builtin_define_with_int_value for fortran/cpp.c?
Regarding builtin_define_std: Couldn't one simply define __<TXT> and __<TXT>__
(after stripping leading _) ignoring the unmodified version?


-- 


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


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

* [Bug fortran/42954] gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry)
  2010-02-04 12:31 [Bug fortran/42954] New: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry) burnus at gcc dot gnu dot org
  2010-02-04 13:03 ` [Bug fortran/42954] " dfranke at gcc dot gnu dot org
  2010-02-04 14:06 ` burnus at gcc dot gnu dot org
@ 2010-02-10 23:40 ` burnus at gcc dot gnu dot org
  2010-03-17  9:32 ` burnus at gcc dot gnu dot org
  2010-08-03 10:09 ` ktietz at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-10 23:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2010-02-10 23:40 -------
(In reply to comment #2)
> Daniel: Wouldn't it be enough to duplicate c-cppbuiltin.c's
> builtin_define_with_value and builtin_define_with_int_value for fortran/cpp.c?
> Regarding builtin_define_std: Couldn't one simply define __<TXT> and __<TXT>__
> (after stripping leading _) ignoring the unmodified version?

I tried this but it fails on x86-64-linux with:
  cpp.c:(.text+0x1d6b): undefined reference to `ix86_target_macros'
which is the file gcc/config/i386/i386-c.c for
  #define TARGET_CPU_CPP_BUILTINS() ix86_target_macros ()


-- 


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


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

* [Bug fortran/42954] gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry)
  2010-02-04 12:31 [Bug fortran/42954] New: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry) burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-02-10 23:40 ` burnus at gcc dot gnu dot org
@ 2010-03-17  9:32 ` burnus at gcc dot gnu dot org
  2010-08-03 10:09 ` ktietz at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-03-17  9:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2010-03-17 09:31 -------
Cross reference: The missing define of "_WIN32" causes failures on
MinGW/MinGW64 for gfortran.dg/dev_null.F90 and gfortran.dg/write_to_null.F90.
(cf. PR 42950 which is otherwise fixed.)


-- 


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


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

* [Bug fortran/42954] gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry)
  2010-02-04 12:31 [Bug fortran/42954] New: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry) burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-03-17  9:32 ` burnus at gcc dot gnu dot org
@ 2010-08-03 10:09 ` ktietz at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2010-08-03 10:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ktietz at gcc dot gnu dot org  2010-08-03 10:09 -------
Created an attachment (id=21373)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21373&action=view)
Patch for fixing at least target part for preprocessor

This patch re-enables at least target defines for fortran's preprocessor.
The architecture part isn't enabled, as for example i386's architecture
preprocessor settings are at the moment just working for C/C++ frontends.


-- 


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


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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-04 12:31 [Bug fortran/42954] New: gfortran with libcpp: TARGET_*_CPP_BUILDINS issues (MinGW, FreeBSD, MIPS, Fry) burnus at gcc dot gnu dot org
2010-02-04 13:03 ` [Bug fortran/42954] " dfranke at gcc dot gnu dot org
2010-02-04 14:06 ` burnus at gcc dot gnu dot org
2010-02-10 23:40 ` burnus at gcc dot gnu dot org
2010-03-17  9:32 ` burnus at gcc dot gnu dot org
2010-08-03 10:09 ` ktietz 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).