In conditions similar to those considered in the judgment of the Court of Justice of 13 December 2005, Marks & Spencer (C‑446/03, EU:C:2005:763), the legislation of a Member State in accordance with which a company resident in that State may deduct from the basis of assessment for corporation tax the losses of a national permanent establishment but not those of a permanent establishment situated in another Member State, in which those losses may definitively not be taken into account, is not compatible with Article 49 TFEU. That the parent company may opt into an ‘international joint taxation scheme', such as that provided for in the national legislation applicable to the case in the main proceedings, which requires it to group together, for the purposes of the same tax, all its subsidiaries and all its permanent establishments situated outside Denmark for a period of 10 years, is not sufficient to prevent that legislation being incompatible with EU law.